Thanks all for the tips. Was able to get it working like I wanted.
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Oct 20, 2004, at 1:02 AM, Chris Ditty wrote:
Hi all. I'm trying to do a little code snippets page for a site I am
working on. I figured it would be simple enough. I would do a
str_replace and replace the various html codes with the ascii
eqivulant. Unfortunately, it is not working as expecte
On Wed, 20 Oct 2004 01:02:12 -0500, Chris Ditty <[EMAIL PROTECTED]> wrote:
> Hi all. I'm trying to do a little code snippets page for a site I am
> working on. I figured it would be simple enough. I would do a
> str_replace and replace the various html codes with the ascii
> eqivulant. Unfortun
Chris Ditty wrote:
Hi all. I'm trying to do a little code snippets page for a site I am
working on. I figured it would be simple enough. I would do a
str_replace and replace the various html codes with the ascii
eqivulant. Unfortunately, it is not working as expected. Can anyone
help with this
On Wed, 04 Aug 2004 08:14:55 -0700, Jon Bertsch <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I have found a problem using the str_replace() function in PHP5. Over this
> past weekend we switched our production server to php5.0.0 running on
> apache 1.3.31 on SUSE9.1. Our development environment is
Jason,
Thanks for looking.
Very perplexing (to me at least).
Jon Bertsch
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
* Thus wrote Jon Bertsch:
> ...
>
> $html_output_1 .= $html_string[0];
>
> $output = str_replace("@@FISCAL_YEAR@@", $this_year, $html_output_1 );
>
> (I call it three times to do the replacements in the string).
>
> ...
>
> On our development box this little application runs fine. In productio
My mistake on $this_year.
Jon Bertsch <[EMAIL PROTECTED]> wrote:
>
>
> Jason,
>
> This code is not using any OO the variable is $this_year not $this->year.
>
> Running it under php5 on my dev box the string replace function works and
> replaces the text as expected.
>
> Jon Bertsch
>
>
Jason,
This code is not using any OO the variable is $this_year not $this->year.
Running it under php5 on my dev box the string replace function works and
replaces the text as expected.
Jon Bertsch
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.
Yup, i understand not in php 5, there was some large OO changes in php
5, which is why i asked about $this->year. Ive been using php 5 for the
last year, and havent had a problem with str_replace, and have used it a
fair amount for loading email templates.
So when you look at the source, the @@F
Jason wrote:
>is it possbile $this->year isnt what you expect?
If I hard code the value it makes no difference and it works fine
in php4.3.x and in dev just not on php5 with some load on the server. It
was tested on the same server before moving to live production and it
worked then as well.
is it possbile $this->year isnt what you expect?
Jason
Jon Bertsch <[EMAIL PROTECTED]> wrote:
>
>
> Hi all,
>
> I have found a problem using the str_replace() function in PHP5. Over this
> past weekend we switched our production server to php5.0.0 running on
> apache 1.3.31 on SUSE9.1. Our
On Wednesday 17 March 2004 20:16, Labunski wrote:
> The problem is that str_replace isn't working preperly:
So *how* does it not work properly?
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applicat
Just change the order and do the "search and replace" on "Blueberry" before doing it
on "Blue."
Ei:
str_replace("Blueberry","Strawberry",$paragraph);
str_replace("Blue","Red",$paragraph);
or:
str_replace(array("Blueberry", "Blue"), array("Strawberry", "Red"), $paragraph);
You could replace the longer one, "Blueberry", first. Then, the only
remaining occurrences of "Blue" will be ones that you really want.
Kirk
> I am performing a str_replace() on a large string, and
> everything works
> fine, except that two of the elements I'm searching for (and
> replacing)
- Original Message -
From: "René Fournier" <[EMAIL PROTECTED]>
To: "php" <[EMAIL PROTECTED]>
Sent: Monday, March 31, 2003 1:52 PM
Subject: [PHP] str_replace() problem
> I am performing a str_replace() on a large string, and everything works
> fine, except that two of the elements I'm sea
16 matches
Mail list logo