Tool to convert JQuery code to run within PHP script
There will be a requirement where JQuery code is to be written within the PHP script by using echo command. This is required when we may have to keep some PHP variables within JQuery script. Example when you collect date from database and wants that to be highlighted as defaultDate for the date picker. Here default date will be available as PHP variable and same is to be embedded inside JQuery code.
In such cases we have to take care of following points .
Use single quote in place of double quotes or escape all double quotes
Escape all $ symbols used inside JQuery as this will be treated as variable inside PHP
Here is a tool to convert your JQuery script to compatible PHP code.