AH> How do you insert a php variable into a javascript function? AH> function redirect(<?php $MyVar ?>) { location = <?php $MyVar ?>; }
function redirect (<?=$MyVar?>) { location = <?=$MyVar?>; }
or use:
function redirect (<?php echo $MyVar; ?>) { location = <?php echo MyVar; ?>; }
The short syntax only works with short_open_tag enabled in php.ini or with ini_set().
-Ben
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php