Re: How to adpated a javascrip with php...

From: Date: Tue, 11 Nov 2003 22:16:04 +0000
Subject: Re: How to adpated a javascrip with php...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-169207@lists.php.net to get a copy of this message
Payne wrote:
Hi, I have a Javascript that I like to use with PHP/MYSQL, But I don't know how to mix the two...
Here is an example. <?php /* do php stuff here, like set a value to $x */ $x = 3; ?> <script> funtion x() { var foo = <?php echo $x; ?>; alert(foo); } </script> -- Burhan Khalid phplist[at]meidomus[dot]com http://www.meidomus.com ----------------------- "Documentation is like sex: when it is good, it is very, very good; and when it is bad, it is better than nothing."

« previous php.general (#169207) next »