Jump to content

str_replace


3raser

Recommended Posts

Yes, from the manual page:

 

"If search is an array and replace is a string, then this replacement string is used for every value of search"

 

http://php.net/manual/en/function.str-replace.php

 

All will be the same length though.  If you want to preserve length it'll be trickier.

Link to comment
https://forums.phpfreaks.com/topic/232923-str_replace/#findComment-1197981
Share on other sites

Yes, from the manual page:

 

"If search is an array and replace is a string, then this replacement string is used for every value of search"

 

http://php.net/manual/en/function.str-replace.php

 

All will be the same length though.  If you want to preserve length it'll be trickier.

 

Thanks, it worked. ;)

Link to comment
https://forums.phpfreaks.com/topic/232923-str_replace/#findComment-1197984
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.