let windowOuterWidth = window.outerWidth;
console.log(windowOuterWidth);
$.ajax({
type: 'POST',
url: 'archive.php',
data: {'Width': windowOuterWidth},
success: function(res){
$("#inneroutput").html(res);
}
});
<?php
$WindowWidth = $_POST['Width'];
echo $WindowWidth;
?>