Re: Weird problem with ?> (Indenting can help!)
| From: | Peter Fraterdeus | Date: | Tue, 10 Oct 2000 14:19:22 +0000 |
| Subject: | Re: Weird problem with ?> (Indenting can help!) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-19350@lists.php.net to get a copy of this message | ||
Jari--
This is a good example of why indenting your code is a good idea.
So:
>...
><?php
>$db = mssql_connect("wsean1567","www","www")or die("Gick inte
>att
>ansluta.");
>mssql_select_db("VCU_Intranet",$db)or die("Kunde inte välja databas.");
>$result = mssql_query("SELECT date,time,head,content,urgent FROM news
>ORDER BY date DESC;")or die("Kunde inte utföra frågan.");
>
>for ($count=0;$count <= 10;$count++)
>{
>$date = mssql_result($result,$count,"date");
>printf("$date <br>\n");
>
>$date = mssql_result($result,$count,"time");
>printf("$time <br>\n");
>
>$headline = mssql_result($result,$count,"head");
>printf("$head<br>\n");
>
>$content = mssql_result($result,$count,"content");
>printf("$content<br><br>\n");
>
>
>?>
you can see immediately that you are misssing the closing bracket '}' in the for loop!
cheers
Peter
--
AzByCx DwEvFu GtHsIr JqKpLo MnNmOl PkQjRi ShTgUf VeWdXc YbZa&@
Peter Fraterdeus http://www.midsummernightstamps.com
Magical Images from the Moon's Garden!
Type on the Edge of History; In Search of the Wild Photon, &c.
http://www.dezinecafe.com/fraterdeus
BookSense http://www.booksense.com
Independent local booksellers on the web.