471,319 Members | 1,607 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,319 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 5351
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

Post your reply

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

Similar topics

2 posts views Thread by Salim | last post: by

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.