Hey Josh:

On Fri, May 10, 2002 at 08:19:59AM -0400, Josh & Valerie McCormack wrote:
> Thanks Dan. It's really close now. But it's duplicating the text string 
> at the beginning and end of the replaces.
> ... snip ...
>    10 123 123 Shawn Adams 456 456 <br>

No, you mean to say that you're replacing the strings twice.  The question is "why?"

Two possible reasons.  The csv file has the names in there twice or the lines in it 
are longer than 1000, so the fgetcsv() hits the line twice before getting to the end.  
Or, perhaps some other strange thing about the csv file.  Oh, of course, the extra 
123's could be in the original file.

Before I forget, if you ever post code or files again, don't put in the line 
numbers.  They get in the way of reading it and if for some reason I wanted to run 
your code on my system, I'd have to get rid of them first.


>      7         $num = count ($data);

Why do you have this line?  It's unnecessary.


> by the way, were you saying I don't need the fcloses?

If your script is about to end, no, you don't need to use fclose().

And two more pointers, don't top post messages and don't endlessly quote the prior 
message.  Delete irrelevant parts and place your comments about particular relevant 
parts just below each relevancy.

Enjoy,

--Dan

-- 
               PHP classes that make web design easier
        SQL Solution  |   Layout Solution   |  Form Solution
    sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY     v: 718-854-0335     f: 718-854-0409

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

Reply via email to