I'm trying to format text from a Mysql data base, and only have to do it with one loop. Why doesen't htids work? and whart will?
<?php
$link = mysql_connect ("localhost", "derekbronston", "xxxxxxx")
or die ("Could not connect");
mysql_select_db("music", $link);
$sql="SELECT * from articles";
$result=mysql_query($sql);
$j=0;
$i=0;
while($row=mysql_fetch_array($result)){
if($name==$row[1]){
$paragraphs=explode("*",$row[2]);
while($j<count($paragrahs)){
print("<p><span class=text>$paragraphs[$j]</span></p>");
}
}
else{
$i++;
}
}
?>