I am having trouble figuring this out. I have an array that contains alot of text and I want to use eregi_replace on all the rows of the array. How would I do this. Here is what I have, but it is not working.
$query_result = mysql_query("select * from content where date_id = $getdate[0]");
$row = mysql_fetch_array($query_result);
while ($row = mysql_fetch_array($query_result))
{
$row = eregi_replace("\r","",$row);
$row = eregi_replace("\n\n","</p><p>",$row);
$row = eregi_replace("\n","<br />",$row);
$row = eregi_replace("\[i]","<i>",$row);
$row = eregi_replace("\[ei]","</i>",$row);
$row = eregi_replace("\[b]","<b>",$row);
$row = eregi_replace("\[eb]","</b>",$row);
}
echo "<p>Opening:</p>";
echo "<p>$row[1]</p>";
echo "<p>Highlights:</p>";
echo "<p>$row[2]</p>";
With the code like this, $row[1] and $row[2] return no results. I am I going in the right direction here?
Thanks!