I'm having a struggle with the php code below
<?php
$list = 0;
$screenWidth = '<script
type="text/javascript">document.write(screen.availWidth);</script>';
if($screenWidth > 700){
$list = 1;
}
echo $screenWidth;
?>
The echo is printing the value of $screenWidth (screen width) correctly.
So it means the js works and is assigning the value from screen.availWidth to $screenWidth correctly but somehow $list is always 0 ! Even when the screen width is 1920
Thanks for your help!
Ceco