how convert from string to int?
If i print $width_s, get: 1024 If i print $width, get 0. How convert string to integer(number) ?
$width_s = '<script language="javascript">document.write(screen.width)</script>'; $width = (int)$width_s; var_dump($width);
(int)"anything that doesn't start with a number"always evaluates to0. What are you actually trying to accomplish? Getting thescreen.width??phptag. (Not the question or the answers, but these comments.)