Solved

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING

Posted on 2011-02-10
3
455 Views
Last Modified: 2013-12-13
Can someone help me figure out why I get a parse error with this string? Thanks.

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

Open in new window


0
Comment
Question by:kadin
3 Comments
 
LVL 2

Accepted Solution

by:
requeue earned 250 total points
ID: 34867175
You have to escape single quote in the text.

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

Open in new window

0
 
LVL 27

Assisted Solution

by:yodercm
yodercm earned 250 total points
ID: 34867188
$output.= ' onclick="this.value='.'" />';

You need a concatenation between the two quotes sections.
0
 

Author Closing Comment

by:kadin
ID: 34867255
Thank you both.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now