afish674 Posted June 18, 2012 Share Posted June 18, 2012 I've just started learning PHP and have a quick question regarding compatibility with jQuery. I noticed that PHP uses the "$" sign to set variables. This would seem to cause a compatibility clash with jQuery as it also uses the "$" sign for functions etc. My question is: If you want to use both on the same page together do you need to re-assign jQueries "$"? or if you use external script files would that get around the problem? Thanks. Link to comment Share on other sites More sharing options...
boen_robot Posted June 18, 2012 Share Posted June 18, 2012 jQuery is a JavaScript library, not a PHP library.By the time JavaScript starts running, PHP is already finished, so there's no conflict. In fact, there's no way you could use JavaScript to get the source of the PHP file that generated the page. Not without the server's cooperation I mean. Link to comment Share on other sites More sharing options...
afish674 Posted June 18, 2012 Author Share Posted June 18, 2012 Thanks! One less thing to worry about then ha. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now