Jump to content

Multiple Replacements in String


PTS

Recommended Posts

I'm trying to figure how to make multiple replacements in a string before echoing the string out.

 

str_replace('Chris Drury', '<a href="/profile.php?playerid=23">Chris Drury</a>', $fullstory);

 

The above code does what I need it to do but just for one player. I want to find a way to make it happen for about 30 players.

 

Is there a way to do this in PHP?

 

Thanks in advance for any advice or direction.

Link to comment
https://forums.phpfreaks.com/topic/45449-multiple-replacements-in-string/
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.