possible to link javascript to php??

Hey guys , i was wondering if its possible to link javascript to php…
Consider this example:
[php]

[/php]

In this i have used the javascript function , is there anyway i can replace

with [php]<?php function message() { echo "Hello! How are you"; } ?>[/php]

and get the same result??

Hi there,

To use javascript inside of PHP you would echo the javascript within the tags or type javascript: before the javascript function: javascript:document.write(‘Hello World’).

Hope this helps.

Sponsor our Newsletter | Privacy Policy | Terms of Service