RE: [PHP] Replacing a space with an underscore

From: Date: Thu, 01 May 2003 08:37:26 +0000
Subject: RE: [PHP] Replacing a space with an underscore
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-145915@lists.php.net to get a copy of this message
str_replace(' ', '_', $someString); -----Original Message----- From: Burhan Khalid [mailto:phplist@meidomus.com] Sent: Thursday, 1 May 2003 6:26 PM To: Ron Allen; php-general@lists.php.net Subject: Re: [PHP] Replacing a space with an underscore Hello Ron, Thursday, May 1, 2003, 10:44:01 AM, you wrote: RA> What I would like to do... RA> I would like to have either MySql or PHP replace a space with an underscore RA> from a MySql query. Any ideas on how to do that? http://www.php.net/manual/en/function.eregi-replace.php $foo = "goat cheese jim zoo"; $bar = eregi_replace(" ","_",$foo); echo $bar; -- Best regards, Burhan phplist[at]meidomus[dot]com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#145915) next »