inspite of the all the efforts that i gave on typecasting using (int)
and intval()
function. I am still not able to convert string to integer.
Whenever I use these function the string gets converted to 0
Here's my code snippet :
$resolution = "<script type='text/javascript'>
document.write('#'+screen.width+'#');</script >";
$screen=str_replace("#","",$resolution);
echo $wid = (int)$screen;
echo $s = 98 * $wid;
The output of the typecast is 0.
I even tried to print the data using var_dump
but it also shows as int(0)