str_replace

str_replace

am 08.08.2009 10:08:57 von Ron Piggott

------=_NextPart_000_0049_01CA17DD.F37F54E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

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 =3D str_replace( $bible_verse_ref, 'bible_verse_ref', =
$text_message_template );

Ron
------=_NextPart_000_0049_01CA17DD.F37F54E0--

Re: str_replace

am 08.08.2009 12:07:41 von Ralph Deffke

looks good,
u r searching for $bible_verse_ref in $text_message_template to be replaced
by the string "bible_verse_ref".

if that makes sence to u, yes its right.

ralph
ralph_deffke@yahoo.de

""Ron Piggott"" wrote in message
news:83745B9E385A4402888BA5924C2965F6@computera1afe9...
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



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

Re: str_replace

am 08.08.2009 12:19:11 von LinuxManMikeC

On Sat, Aug 8, 2009 at 2:08 AM, Ron Piggott wro=
te:
> 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 =3D 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

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

Re: str_replace

am 08.08.2009 12:36:23 von Ron Piggott

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

----- Original Message -----
From: "LinuxManMikeC"
To: "Ron Piggott"
Cc: ;
Sent: Saturday, August 08, 2009 6:19 AM
Subject: Re: [PHP] str_replace


On Sat, Aug 8, 2009 at 2:08 AM, Ron Piggott
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