note 66317 deleted from function.fgetcsv by danbrown

From: Date: Sun, 17 May 2009 18:14:30 +0000
Subject: note 66317 deleted from function.fgetcsv by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-155083@lists.php.net to get a copy of this message
Note Submitter: br0derbund at hotmail ---- Thank you donnoman and ramdac, that's exactly the kind of function I needed! For my use, assigning metadata to images, I actually want the first dimension array key to be a string pulled from the CSV; the unique filename, instead of a number. Easy, just insert the second dim's key... Change: $return[]=$row; To: $return[$data[0]]=$row; (You may indeed wish to confirm unique values first!) Also, if you find the fields getting out of sync, increase the $len byte count for the largest cell of data.

« previous php.notes (#155083) next »