Forum Moderators: coopster

Message Too Old, No Replies

Replace output from spaces to dashes

         

paradoxos

4:10 am on Jul 29, 2005 (gmt 0)

10+ Year Member



I have a database with names that often have spaces, for example:

First Company Name

I would like to replace these spaces with dashes so I can put them in the html:

www.example.com/First-Company-Name/

Anybody know how to do this?

kvnband

4:14 am on Jul 29, 2005 (gmt 0)

10+ Year Member



built in function str_replace

[us3.php.net...]

prometeus

6:17 am on Jul 29, 2005 (gmt 0)

10+ Year Member



$out = str_replace(" ", "/", $out);