PHP quotes inside quotes?

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Guest
can someone please encapsulate this for me. i can get the needed quotations for value in the rendered HTML

echo '<. a href="#" onclick="document.tagform.tag.value='4654' ; document.tagform.submit();" .>test< ./a>';

note the periods in the a tag so yahoo doesnt change the code.

thanks
 
Just escape the extra quotes with a \ character:

echo '<. a href="#" onclick="document.tagform.tag.value=\'465... \'; document.tagform.submit();" .>test< ./a>';

I've added an additional \' to the end of the document.tagform.tag.value which I assume was unintentionally omitted
 
Back
Top