RE: [PHP] Multidimensional Arrays

From: Date: Mon, 20 Oct 2003 18:59:33 +0000
Subject: RE: [PHP] Multidimensional Arrays
Groups: php.general 
Request: Send a blank email to php-general+get-166799@lists.php.net to get a copy of this message
Ed Curtis <mailto:ed@homes2see.com> on Monday, October 20, 2003 11:39 AM said: > What I'd like to do is break this into a multidimensional > array so I have approximately the following depending on what they > choose for each example. [snip] > I tried the following with no luck. > > $listing['count'] = $_POST['listing[count]']; > > $listing['$count'] = explode(",", $listing['$count']); Dis: function returnArray($input) { $arrCnt = count($input); $iCnt = 0; while($iCnt < $arrCnt) { $listing[$iCnt] = explode(",", $input[$iCnt]); } return $listing; } Untested, but looks ok. Chris. -- Don't like reformatting your Outlook replies? Now there's relief! http://home.in.tum.de/~jain/software/outlook-quotefix/

« previous php.general (#166799) next »