vendredi 19 décembre 2014

how to PHP if condition with browser width?

I have some script like below but it does not work



<?php
$width = "<script>document.write(window.outerWidth);</script>";
$width2 = (int)$width;
echo $width2;
if ( $width2 < 800 ) { ?>
bad
<? } else { ?>
ok
<? } ?>


please help me ...


Aucun commentaire:

Enregistrer un commentaire