html - Solving simple quotes and Php -


sorry if question has been answered found on internet didn't me much.i got problem php , simple quotes

here code :

echo "<span onclick='search(\"".$value."\");'>".some stuff."</span>"; 

my problem $value simple quotes (they music titles). got problems 't' stands trouble, can't stand losing ...

i tryed addslashes($value) not work. idea ? :)

try htmlspecialchars($value,ent_quotes);

it's better rid of these slashes:

?> <span onclick='search("<?=htmlspecialchars($value,ent_quotes);?>");'>     stuff </span> <?php // php 

Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -