Code: Select all
<?php
$link=mysql_connect("localhost","[b]username[/b]","[b]password[/b]");
$db=mysql_select_db("[b]database_name[/b]",$link);
$query="SELECT * FROM news_posts";
$result=mysql_query($query,$link);
$numrows=mysql_num_rows($result);
for($i=0; $i<$numrows; $i++){
$the_arrays=mysql_fetch_array($result);
print("<br /><h2 class="sub">$the_arrays['title']</h2>\n");
print("<br /><span style="font-size:8pt;">posted: <i>$the_arrays['date']</i>"
."\nID: <i>$the_arrays['id']</i></span>\n");
print("<br /><p>$the_arrays['posttext']</p>");
}
?>Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/slicknet/public_html/news/index.php on line 9
So it must be complaining about $the_arrays['title'].