Re: [PHP] str_replace not replacing

2004-02-11 Thread Aaron Merrick
; Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] str_replace not replacing > > Hello Aaron, > > Wednesday, February 11, 2004, 3:00:47 PM, you wrote: > > AM> $section1 = file_get_contents("table_create.php"); > AM> str_replace($search, $replace, $

Re: [PHP] str_replace not replacing

2004-02-11 Thread Jason Wong
On Wednesday 11 February 2004 23:00, Aaron Merrick wrote: > My problem is, I want to replace the table name in the original file with a > new table name before I output it to the new file. But the str_replace has > no effect. [snip] > str_replace($search, $replace, $section1); str_replace() re

Re: [PHP] str_replace not replacing

2004-02-11 Thread Richard Davey
Hello Aaron, Wednesday, February 11, 2004, 3:00:47 PM, you wrote: AM> $section1 = file_get_contents("table_create.php"); AM> str_replace($search, $replace, $section1); You need to assign the output of str_replace to something: $new_section = str_replace($search, $replace, $section1) -- Best r

[PHP] str_replace not replacing

2004-02-11 Thread Aaron Merrick
I'm reading in to a variable $section1 an entire php file that creates a mysql table. I can output the variable in a new file just fine (figured out what all had to be escaped in the original file). My problem is, I want to replace the table name in the original file with a new table name before I