Jump to content

Find an replace array items


denoteone

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.