How to avoid escaping double quotes and single quotes in php -
i sure there must better way putting backslash (\) escape double quotes in php
suppose have following
<param name="flashvars" value="config={clip:{autoplay:true,autohide..... the value consist of many " , ' , getting tedious adding \ before every "
you can use addslashes in case. don't use queries database though. use specific escape functions that.
$param = "config={clip:autoplay:true,autohide..."; // put full value here and in html:
<param name="flashvars" value="<?php echo addslashes($param) ?>">
Comments
Post a Comment