Can not compare string from document.write and php's string
<p>Dear all expert i had a problem for comparing my string from document.write with a php's string and when i use var_dump(variable) i see that the string is not the same even though echo value is the same, any know about to make it work?</p>

<pre><code>$resolution_width = "&lt;script type='text/javascript'&gt; document.write(window.screen.width); &lt;/script&gt;";

$resolution_height = "&lt;script type='text/javascript'&gt;document.write('#'+window.screen.height+'#'); &lt;/script&gt;";  


$screen_width=$resolution_width; 
$screen_height=str_replace("#","",$resolution_height); 

echo var_dump($screen_width);
$str='1280';
echo "&lt;BR&gt;";
echo "&lt;BR&gt;".var_dump($str);

if($screen_width=='1440'){
    $width=1440;
    echo $width;
}
elseif($screen_width=='1360'){
    $width=1360;
    echo $width;

}
elseif($screen_width=='1280'){
    $width=1280;
    echo $width;

}
elseif($screen_width=='1152'){
    $width=1152;
    echo $width;
}
elseif($screen_width=='1024'){
    $width=1024;
    echo $width;
}
elseif($screen_width=='800'){
    $width=800;
    echo $width;
}
</code></pre>

<p>This is my result when i try to output it, as it false every comparison.
I think this string is the same but it maybe different conversion.</p>

<p>My result :</p>

<pre><code>string(78) "1280"
string(4) "1280"
</code></pre>
