Welcome Guest, Not a member yet? Register   Sign In
Escape quotes/strip slashes.
#8

[eluser]xzela[/eluser]
Try this:
Also, note that i removed the '\n' command as it is not needed at the moment.

Code:
<?php
    $park_id = $row->park_id;
    $park_name = $row->park_name;
    $park_city = $row->park_city;
    $park_state = $row->park_state;
    $string = "<a >" . $park_id . "/". $park_name . "</a><br>" . $park_city. "," . $park_state;
    $html_info = addslashes($string);
?&gt;
var htmlInfo = "&lt;?php echo $html_info; ?&gt;";

I don't know if this is going to work for what you need. But i tested it with a single quote and it appeared to work.


Messages In This Thread
Escape quotes/strip slashes. - by El Forum - 02-04-2009, 02:13 PM
Escape quotes/strip slashes. - by El Forum - 02-04-2009, 05:32 PM
Escape quotes/strip slashes. - by El Forum - 02-04-2009, 05:42 PM
Escape quotes/strip slashes. - by El Forum - 02-04-2009, 06:00 PM
Escape quotes/strip slashes. - by El Forum - 02-04-2009, 06:04 PM
Escape quotes/strip slashes. - by El Forum - 02-04-2009, 06:06 PM
Escape quotes/strip slashes. - by El Forum - 02-04-2009, 06:15 PM
Escape quotes/strip slashes. - by El Forum - 02-04-2009, 06:58 PM
Escape quotes/strip slashes. - by El Forum - 02-04-2009, 07:18 PM
Escape quotes/strip slashes. - by El Forum - 02-04-2009, 07:41 PM



Theme © iAndrew 2016 - Forum software by © MyBB