Results 1 to 4 of 4
Thread: Escape JS to build php string
Nov 9, 2011, 16:20 #1
Escape JS to build php string
I need to escape certain characters in the following line:
<a onclick="$('#product').submit();" id="add_to_cart" class="button"><span><?php echo $button_add_to_cart; ?></span></a>
so that I can insert them into a php echo,
i.e. $my_string = "<a onclick="$('#product').submit(); etc...etc"
I am usually pretty decent at doing this but I am having some strange results and would really appreciate a fresh pair of eyes on it.
Silversurfer"Persistence is the path to perfection"