Posted by macca on 12/22/07 20:05
PHP is server side and is converted to HTML by the time it reaches the
client (browser). JavaScript is client side and is interpreted by the
client (browser) on the other side.
Thus, you can write javascript with PHP but you cant write PHP with
javascript.
e.g.
<?php
echo '<script type="text/javascript">alert("javascript alert")</
script>';
?>
Navigation:
[Reply to this message]
|