Solved

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING

Posted on 2011-02-10
3
453 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

747 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

13 Experts available now in Live!

Get 1:1 Help Now