Re: str_replace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Yes I did.  Thank you for confirming this with me.  Ron

----- Original Message ----- From: "LinuxManMikeC" <linuxmanmikec@xxxxxxxxx>
To: "Ron Piggott" <ron.php@xxxxxxxxxxxxxxxxxx>
Cc: <php-general@xxxxxxxxxxxxx>; <phpster@xxxxxxxxx>
Sent: Saturday, August 08, 2009 6:19 AM
Subject: Re:  str_replace


On Sat, Aug 8, 2009 at 2:08 AM, Ron Piggott<ron.php@xxxxxxxxxxxxxxxxxx> wrote:
Am I understanding str_replace correctly? Do I have this correct or are ' needed?

$bible_verse_ref is what I want to change to (AKA replace)
bible_verse_ref is what I change to change from (AKA search)
$text_message_template is the string I want to manipulate

$text_message = str_replace( $bible_verse_ref, 'bible_verse_ref', $text_message_template );

Ron

If I understand you right, I think you have the search and replace
arguments mixed up.  Your current code will look for all occurrences
of $bible_verse_ref in $text_message_template and replace it with
'bible_verse_ref'.

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


--------------------------------------------------------------------------------



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.392 / Virus Database: 270.13.47/2289 - Release Date: 08/07/09 18:37:00


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux