Array within array

From: Date: Fri, 30 Sep 2005 10:29:11 +0000
Subject: Array within array
Groups: php.general 
Request: Send a blank email to php-general+get-223457@lists.php.net to get a copy of this message
Greetings PHP community, I have a CSV text file which I need to use to update existing DB records. So I have the following : $array_file = file("path/to/file"); file() creates an array comprising each line of the file, but if each line contains 20 or so CS values, how do I go about reading each line and updating the db. Pseudo code : ===== $array_file = file("path/to/file"); while (explode(',',$file_array)) { do update on db for each line of array } ===== Any pointers ? -- Chris Blake Cell: 082 775 1492 Work: +27 11 880 2825 Fax : +27 11 782 0841 Mail: chris@pixcel.co.za Immortality -- a fate worse than death. -- Edgar A. Shoaff

« previous php.general (#223457) next »