[PHP] Re: Question about string replace -PHP

2002-05-14 Thread Josh Valerie McCormack
I didn't ask the question about this, but I have a related issue. I'm trying to do a replace, and am using str_replace, but the outcome is not what I expected. Here's my code: ? $fp = fopen(new_data.csv, r); $text = fopen(text.txt, r); $merged = fopen(merged_text.html, w); $filecontents

Re: [PHP] gobbling replace

2002-05-10 Thread Josh Valerie McCormack
, 9 May 2002 23:39:34 -0400 To: PHP List [EMAIL PROTECTED] On Thu, May 09, 2002 at 03:17:09PM -0400, Josh Valerie McCormack wrote: I'm doing a str_replace (same thing happens with ereg and preg) and when the pattern is found it's erasing everything after it and doing a strange replace, too

[PHP] gobbling replace

2002-05-09 Thread Josh Valerie McCormack
I'm doing a str_replace (same thing happens with ereg and preg) and when the pattern is found it's erasing everything after it and doing a strange replace, too. I'm using a seven column CSV (new_data.csv) where the first [0] column is first name and the second [1] is last name. This is what

Re: [PHP] replace question

2002-05-06 Thread Josh Valerie McCormack
($merged); 25 fclose ($text); 26 ? Josh Miguel Cruz wrote: On Sun, 5 May 2002, Josh Valerie McCormack wrote: I'm iterating through a CSV file pulling in rows as arrays with fgetcsv and I'd like to search for patterns made up of the first two array items of each row with a space

[PHP] replace question

2002-05-05 Thread Josh Valerie McCormack
I'm iterating through a CSV file pulling in rows as arrays with fgetcsv and I'd like to search for patterns made up of the first two array items of each row with a space between them in a text file, and make them into links. I can't figure out how to do this, could someone help? Josh --

Re: [PHP] Re: file() and macintosh line break

2002-05-03 Thread Josh Valerie McCormack
I was having a tough time with a Mac file uploaded and squeezed into one line. My friend Shawn helped me write the following which cleans it up. Remove the echo statement to just change it and not see the change. Also, avoid trying to fix the file, make a new one, if you can. Hope this helps.

Re: [PHP] php/.htaccess/.htpasswd

2002-05-03 Thread Josh Valerie McCormack
I've used the script phtaccess, which I think used the mentioned class. Super easy to use. Josh On Wed, 1 May 2002, Kelly Meeks wrote: Is is possible to use php to admin a password file used by a .htaccess file? You should check the File_Passwd class from PEAR.

[PHP] replace strings in looped fgetcsv results

2002-05-02 Thread Josh Valerie McCormack
I have a text file with info and people's names in it. I have a csv file with people's names in it. I want to open both, read the text file into a variable, iterate through the csv file with fgetcsv and replace the names in the text file with data from the csv file. so, I have a csv file with