Thanks for your reply! The page I'm working is here, and here's the coding that I have so far (that doesn't work correctly)
<?php
while ($array= mysql_fetch_assoc($result)){
$completeTitle ="$array[name] $array[title]";
$nameLength = strlen($completeTitle) * 10.5;
$difference = 330 - $nameLength;
$margin = $difference / 2 + 25;
$titleName ="$array[name] - $array[title]";
if ($array[category] == senior){
echo "<div id=\"seniorPastor\"><!--Start: Senior Pastor-->\n";
echo "<img src =\"http://development.ccgulfbreeze.com/about/staff/images/$array[image].jpg\" width=\"106\" height=\"152\" class=\"staffPicture\" alt=\"$titleName\"/>\n";
echo "<img src=\"http://development.ccgulfbreeze.com/about/staff/includes/staffName.php?txt=$titleName&margin=$margin\" alt=\"$titleName\"/>\n";
echo "<p id=\"biography\">\n";
echo $array[bio];
echo "</p>\n";
echo "<div id=\"contactStaff\"><a href=\"http://www.ccgulfbreeze.com/contact/index.php?who=$array[name]\">Contact $array[name]</a></div>\n";
echo "</div><!--End: Senior Pastor-->\n";
}
if ($array[category] == pastoral){
echo "<div id=\"pastoralStaff\"><!--Start: Pastoral Staff-->\n";
echo "<img src =\"http://development.ccgulfbreeze.com/about/staff/images/$array[image].jpg\" width=\"106\" height=\"152\" class=\"staffPicture\" alt=\"$titleName\"/>\n";
echo "<img src=\"http://development.ccgulfbreeze.com/about/staff/includes/staffName.php?txt=$titleName&margin=$margin\" alt=\"$titleName\"/>\n";
echo "<p id=\"biography\">\n";
echo $array[bio];
echo "</p>\n";
echo "<div id=\"contactStaff\"><a href=\"http://www.ccgulfbreeze.com/contact/index.php?who=$array[name]\">Contact $array[name]</a></div>\n";
echo "</div><!--End: Pastoral Staff-->\n";
}
}
?>