denoteone Posted March 23, 2010 Share Posted March 23, 2010 I have an array with numbers in it. The numbers correspond to terms: Should I find and replace the numbers with the terms? Or is there a better way of doing this? $group= array("1","2","3"); 1 = Home Team 2 = Away Team 3 = mascot I want to be able to use the array and say something like echo $group[1]; Away Team Link to comment https://forums.phpfreaks.com/topic/196281-find-an-replace-array-items/ Share on other sites More sharing options...
JAY6390 Posted March 23, 2010 Share Posted March 23, 2010 $group = array( 1 => 'Home Team', 2 => 'Away Team', 3 => 'mascot' ); echo $group[1]; Link to comment https://forums.phpfreaks.com/topic/196281-find-an-replace-array-items/#findComment-1030733 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.