Assuming your page is called something like myPageWithScripts.php, do
something like this:
< html >
< head >
< script language="javascript" type="text/javascript" >
< !-- //Hide
function myFunction {
alert("My PHP variable value is <? echo($variable); ?>");
}
// -->
< /head >
...and so on.
Jordan wrote:
> Hey all,
>
> Just a quick question...how would you pass a PHP variable to a JavaScript
> function?
>
> -Jordan
>
>
>
>
--
Sliante,
Richard S. Crawford
mailto:[EMAIL PROTECTED]
http://www.mossroot.com
AIM: Buffalo2K ICQ: 11646404 Yahoo!: rscrawford
MSN: [EMAIL PROTECTED]
"When you have lost the ability to laugh at yourself, you have lost the
ability to think straight." --Clarence Darrow
"Push the button, Max!"
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]