how to write JavaScript within PHP code?

how to write JavaScript within PHP code?

you echo your javasript just like you do your HTML.

Perhaps you should as in a PHP forum for more details. You’ll likely get your answer much faster :slight_smile:
http://www.google.com.br/search?num=100&q=php+and+javascript