<?php $sizeh = '<script type="text/javascript">
document.write(viewportheight);</script>';
echo $sizeh;
echo gettype ($num);
$num = (int) $sizeh;
//$num = intval($sizeh);
echo gettype ($num);
echo $num;
?>
This results is:
1083 string integer 0
Why I am getting the value of zero while that zero should be 1083 ??
$sizeh1083? Your PHP script cannot see the values of javascript like that.