javascript - Php escaping double quotes while echoing variable -


i have got piece of php code passed javascript need escape double quotes (single quotes not working). problem include php variable in it:

$event_list.="<input type=\"hidden\" name=\"myid\" value=\"".$event['id']."\"><input type=\"hidden\" name=\"ticket_type\" value=\"account\">"; 

my problem value=\"".$event['id']."\" returns value

how should manage pass value correctly?

if need escape quotes again may need use \\" pass \" through js

that should slash slash slash quote ( \ \ \ " )


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -