Jump to content

Replace "," with "to"


prudens

Recommended Posts

Put that line in a string or if they're already variables just do:

 

$variable = str_replace(",", 'to', $variable);

 

Wow, that's it. :)

 

That would look ugly, something like

 

09-12-2007to05-20-2008to11-20-2010

 

Add Spaces

 

$variable = str_replace(",", ' to ', $variable);

 

09-12-2007 to 05-20-2008 to 11-20-2010

wow Thats it. :)

Link to comment
https://forums.phpfreaks.com/topic/93963-replace-with-to/#findComment-481416
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.