Solved

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING

Posted on 2011-02-10
3
464 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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:Cornelia Yoder
Cornelia Yoder 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
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…

739 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