I have some Categories (numbers) in a MYSQL database that I am trying to echo and match up with a Category Name. eg. (1 = Mountain Bike, 2 = Road, 3 = Cyclocross)
I think I need to make an array or function to make this easier on myself when I echo the $event_type, what do you guys think?
if ($row_Recordset1['event_type'] == '1') echo 'Mountain Bike';
else if ($row_Recordset1['event_type'] == '2') echo 'Road';
else if ($row_Recordset1['event_type'] == '3') echo 'Cyclocross';
Thanks in advance!
try something like this