I tried nl2br() and str_replace(), but none of those functions worked. If it helps, here is the code: (the database query and the display function, which in this file is just a definition)
function get_lg_img_details($posid)
{
if(!$posid)
return false;
db_connect();
$result = mysql_query("SELECT * FROM imagetest
WHERE posid = '$posid'");
if(!$result)
return false;
if(!mysql_num_rows($result))
return false;
$result = db_result_to_array($result);
return $result;
}
function display_lg_img($picdis_array)
{
if(!is_array($picdis_array))
{
return false;
}
else
{
foreach($picdis_array as $row)
{
echo '<img src="../'.$row['imgsrc'].'">'
.'<br /><p class="stext"><b>'.$row['jobname'].'</b></p>'
.'<br /><p class="stext">'.$row['imgdescrib'].'</p>';
}
}
}
*Note, the string I am trying to format is located in the "imgdescrib" field, which in this example is located in the last line in the foreach() loop in display_lg_img().