note 66317 added to function.fgetcsv

From: Date: Fri, 19 May 2006 03:32:36 +0000
Subject: note 66317 added to function.fgetcsv
Groups: php.notes 
Request: Send a blank email to php-notes+get-111638@lists.php.net to get a copy of this message
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. ---- Server IP: 66.207.199.35 Probable Submitter: 70.64.32.236 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.fgetcsv.php Edit -- http://master.php.net/note/edit/66317 Del: integrated -- http://master.php.net/note/delete/66317/integrated Del: useless -- http://master.php.net/note/delete/66317/useless Del: bad code -- http://master.php.net/note/delete/66317/bad+code Del: spam -- http://master.php.net/note/delete/66317/spam Del: non-english -- http://master.php.net/note/delete/66317/non-english Del: in docs -- http://master.php.net/note/delete/66317/in+docs Del: other reasons-- http://master.php.net/note/delete/66317 Reject -- http://master.php.net/note/reject/66317 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#111638) next »