Forum Moderators: coopster

Message Too Old, No Replies

Where can I put semicolon?

         

winpeace

6:52 am on Feb 1, 2007 (gmt 0)

10+ Year Member



$topics = ssi_recentTopics(8, null, 'array');
foreach($topics AS $topic);
{
echo '<li><a href="' . $topic['href'] . '"><font color="red">' . $topic['subject'] . '</font></a></li><br />';
}

explorer detecs error.it says ; need.
where can ý put semicolon?

cameraman

6:56 am on Feb 1, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Remove this one:
foreach($topics AS $topic);

When you have curly braces { } you don't use a semicolon.

winpeace

6:59 am on Feb 1, 2007 (gmt 0)

10+ Year Member



I remove but it doesn't work :(

<snip>

[edited by: engine at 12:17 pm (utc) on Feb. 1, 2007]
[edit reason] No urls, thanks. See TOS [webmasterworld.com] [/edit]

omoutop

7:02 am on Feb 1, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



try this syntax (changed some ' into ")

$topics = ssi_recentTopics(8, null, "array");
foreach($topics as $topic)
{
echo "<li><a href=".$topic['href']."><font color=\"red\">".$topic['subject']."</font></a></li><br>";
}

winpeace

7:09 am on Feb 1, 2007 (gmt 0)

10+ Year Member



I try your codes but it agains not work.
my web site is <snip>
the error codes explorer under left side

[edited by: engine at 12:17 pm (utc) on Feb. 1, 2007]
[edit reason] No urls, thanks. See TOS [webmasterworld.com] [/edit]

omoutop

7:40 am on Feb 1, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



can't see any php errors in the site with my browses (IE, Opera, Firefox)

appi2

7:45 am on Feb 1, 2007 (gmt 0)

10+ Year Member



$topics = ssi_recentTopics(8, null, 'array');
foreach($topics AS $topic)
{
echo "<li><a href=\"". $topic['href'] ." \"><font color=\"#ff0000\">" . $topic['subject'] . "</font></a></li><br />";
}

eelixduppy

12:01 pm on Feb 1, 2007 (gmt 0)



Can you copy and paste the exact error that you are receiving, with respective line number(if applicable), please.