I have a problem in my if else condition. My Screen Width is:1366 My code should show the if part but always it is showing the else part. I don't know WHY.. First of all i run the if condition without casting but problem was same... Then later on i casted into (int) but still the problem is same
$screenWidth = "<script>document.writeln(screen.width);</script>";
echo "Screen Width is:" . $screenWidth;
if( (int)$screenWidth > 500)
{
echo "if part:" . $screenWidth;
}
else
{
echo "else part:" . $screenWidth;
}