Hello,
I have this PHP code
echo '<a href="#" onclick="updateByQuery(\'Layer3\', ' . json_encode($query) . ');">Link 1</a>';
which generates a link like this:
<a href="#" onclick="updateByQuery('Layer3', "Ed Hardy");">Link 1</a><li>Link 2</li>
Causing the javascript to not be called. How would I make it generate single quotes around the result of $query, in this case ed hardy?