Friday, 15 February 2013

Javascript inside php code not displaying -



Javascript inside php code not displaying -

i have within php code

var_dump($var); $var =' <script type="text/javascript"> '.$var.' </script>' ; var_dump($var);

the first var_dump displays correctly value, sec displays empty string.

exemplary output:

notice: undefined variable: var in /code/idpgmo on line 3 null notice: undefined variable: var in /code/idpgmo on line 7 string(50) " " php notice: undefined variable: var in /code/idpgmo on line 3 php notice: undefined variable: var in /code/idpgmo on line 7

why so?

it because browser handling script. scripts not shown run script in source not displayed on screen

php javascript

No comments:

Post a Comment