This might seem trivial, but the intval()
is returning 0 in the following case:
$window_width = "<script type='text/javascript'>document.write(window.innerWidth);</script>";
$window_width2 = intval($window_width);
echo $window_width2;
$window_width
will be "1366"
.
$window_width2
will be 0
.
I need $window_width2
to be integer
, not string
.