Menu
Why doesn’t this work? – I’m trying to display just the letter M if record contains Male, and F id the record contains Female.
[CODE]$record = 1;
while($row = mysql_fetch_array($result))
{
$sex = substr($row[‘Sex’], 0, 1;
echo “<tr>”;
echo “<td>” . $record++ . “) ” . $row[‘Firstname’] . “<br>” . $row[‘Lastname’] . “</td>”;
echo “<td>” . $sex . “</td>”;
echo “</tr>”;
}
echo “</table>”;