Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING

Can someone help me figure out why I get a parse error with this string? Thanks.

$output.= ' onclick="this.value=''" />';

Open in new window


kadinAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
requeueConnect With a Mentor Commented:
You have to escape single quote in the text.

$output.= ' onclick="this.value=\'\'" />';

Open in new window

0
 
Cornelia YoderConnect With a Mentor ArtistCommented:
$output.= ' onclick="this.value='.'" />';

You need a concatenation between the two quotes sections.
0
 
kadinAuthor Commented:
Thank you both.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.