472,992 Members | 3,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,992 software developers and data experts.

Parse Error : syntax error, unexpected T_STRING, expecting ',' or ';'

hi to all,

i am getting syntax error on my code..

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in D:\xampp\htdocs\Dummy\paulraj\matrim\exam.php on line 62

what's the actual problem here..?

my code

Expand|Select|Wrap|Line Numbers
  1. echo  '<input type="image" name="'.$i.'_img" value="'.$i.'_img" src="'.$imagesArray['src'][$i].'" alt="'.$imagesArray['alt'][$i].'" onclick="document.getElementById('img').src=this.src; document.getElementById('img').alt=this.alt;" />';     /*  line 62  */
Sep 20 '08 #1
3 5533
258 100+
The problem is that you can NOT use single qoute inside another one.

If you need to do it then you have to put a \ before them. I changed your code

Expand|Select|Wrap|Line Numbers
  1. echo '<input type="image" name="'.$i.'_img" value="'.$i.'_img" src="'.$imagesArray['src'][$i].'" alt="'.$imagesArray['alt'][$i].'" onclick="document.getElementById(\'img\').src=this.src; document.getElementById(\'img\').alt=this.alt;" />';
Sep 20 '08 #2
5,821 Expert 4TB
bnashenas, please proof your posts and fix your code tags. If you can't figure out why your post isn't formatting correctly, please PM a moderator.
Sep 20 '08 #3
The problem is solved...

Thanks a lot.....
Sep 20 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Salim | last post by:
Hi people, keep getting this errorParse error: parse error, unexpected T_STRING in order_fns.php line 91. the code is below for the file and I've indicated line 91 <?php function...
by: Anna MZ | last post by:
I am new to php and have written the following mysql code to enter the details of a new user in the admin subdomain of my website: $sql = "INSERT INTO 'users' ('userid', 'username', 'upassword')...
by: kestrel | last post by:
I have some html code that is supposed to be displayed by php echo. But for some reason i keep getting a syntax error, and i cant figure out what is going on. Heres what i have <?php...
by: rhys | last post by:
My Gurus and Angels -- Please pardon this old-school programmer, only recently enlightened to open-source, having been trapped in the convenience of proprietary lingos for way too long. My...
by: sclarkstone | last post by:
Im getting this error; Parse error: syntax error, unexpected T_STRING, expecting ':' or ';' with this line; header ('postcodesearch.php?e=nw&pcode=',); I cant find whats wrong, can anyone...
by: Lawrence Krubner | last post by:
Imagine a template system that works by getting a file, as a string, and then putting it through eval(), something like this: $formAsString = $controller->command("readFileAndReturnString",...
by: fburn | last post by:
I need some help with an error I'm getting using php 5.2.5 running on linux. I receive an error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or...
by: benicio | last post by:
Parse error: syntax error, unexpected T_STRING, expecting '(' in C:\wamp\www\study_group\includes\functions.php on line 19 I got this error and this syntax is from 8 to 19th line. <?php ...
by: riverdale1567 | last post by:
Hi I am a newbie trying to get some of my first code working, yada yada yada. I have a drop down box which chooses a state then takes the post data to 'processform2.php' to use that to pull up...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.