[PHP] str_replace problem

2004-10-20 Thread Chris Ditty
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? This is what I

Re: [PHP] str_replace problem

2004-10-20 Thread Silvio Porcellana
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

Re: [PHP] str_replace problem

2004-10-20 Thread Robin Vickery
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.

Re: [PHP] str_replace problem

2004-10-20 Thread Philip Thompson
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

Re: [PHP] str_replace problem

2004-10-20 Thread Chris Ditty
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

[PHP] str_replace() problem in PHP5 - anyone else?

2004-08-04 Thread Jon Bertsch
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 identical. I have an application that runs a series of str_replace calls to drop in

Re: [PHP] str_replace() problem in PHP5 - anyone else?

2004-08-04 Thread Jason Davidson
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

Re: [PHP] str_replace() problem in PHP5 - anyone else?

2004-08-04 Thread Jon Bertsch
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.

Re: [PHP] str_replace() problem in PHP5 - anyone else?

2004-08-04 Thread Jason Davidson
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

Re: [PHP] str_replace() problem in PHP5 - anyone else?

2004-08-04 Thread 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:

Re: [PHP] str_replace() problem in PHP5 - anyone else?

2004-08-04 Thread Jason Davidson
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 -- PHP

Re: [PHP] str_replace() problem in PHP5 - anyone else?

2004-08-04 Thread Curt Zirzow
* 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 production where

Re: [PHP] str_replace() problem in PHP5 - anyone else?

2004-08-04 Thread Jon Bertsch
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

Re: [PHP] str_replace() problem in PHP5 - anyone else?

2004-08-04 Thread Justin Patrin
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

[PHP] str_replace problem

2004-03-17 Thread Labunski
Probleema sekojosha: Shiim koda rindinjaam buutu jaanolasa IP adrese no temp.txt faila, tad ieksh log.txt faila jaasameklee identiska IP adrese (taada pati kaa temp.txt failaa) un jaaizdzçð taa no log.txt faila. Itkaa jau vienkaarshi, BET tas skripts nedarbojas :( The problem is that str_replace

Re: [PHP] str_replace problem

2004-03-17 Thread Jason Wong
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 Applications

[PHP] str_replace() problem

2003-03-31 Thread René Fournier
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) have the same first letters. To keep it the issue clear, here's a simple example of what I'm talking about: Blue Blueberry Now, if I use:

Re: [PHP] str_replace() problem

2003-03-31 Thread Kevin Stone
- 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 searching

RE: [PHP] str_replace() problem

2003-03-31 Thread Johnson, Kirk
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) have

Re: [PHP] str_replace() problem

2003-03-31 Thread Marcus Rasmussen
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);

[PHP] str_replace problem

2002-02-04 Thread Tomy Wagner
hi, got a weird problem... what i am trying is this: $str = str_replace(é, e, $str); in a string containing a 'é' for sure... but it doesn't replace it.. when i try this: echo str_replace(é, e, dfsdfsdfé); it works !? any suggestions? Tomy Wagner