I have a site where I am building a pop-up window that is populated by the link that is click.
To do so I need to add information from my array to the links. There are about 15 dynamically made on each page.
The only problem I am having is this.
I need to get:
<a href="#" onClick="window.open('http://localhost/image.php?image=".htmlspecialchars (stripslashes($pics_array[$i][1]))."&LongDesc=".htmlspecialchars (stripslashes($pics_array[$i][3]))."$Short=".htmlspecialchars (stripslashes($pics_array[$i][2]))."','window_name','location=no,scrollbars=no,resize=no');>
out of the code.
The problem I get is the when I do Echo I get:
echo "<a href="#" onClick="window.open('http://localhost/image.php?image=".htmlspecialchars (stripslashes($pics_array[$i][1]))."&LongDesc=".htmlspecialchars (stripslashes($pics_array[$i][3]))."$Short=".htmlspecialchars (stripslashes($pics_array[$i][2]))."','window_name','location=no,scrollbars=no,resize=no');>";
which causes parse errors.
Basically my quotes are making the other quotes misused syntax.
What can I do?