Re: Multidimensional arrays (more and more...)

From: Date: Thu, 28 Nov 2002 18:02:52 +0000
Subject: Re: Multidimensional arrays (more and more...)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-126428@lists.php.net to get a copy of this message
if [$number] is unique, use it as the key: // $issue[]["number"] = "number"; -- removed $issue[$number]["headline"] = "headling"; $issue[$number]["writers"] = "writers"; $issue[$number]["list"] = "list"; $issue[$number]["senttosubscribers"] = "0"; $issue[$number]["month"] = "05"; $issue[$number]["year"] = "2003"; $issue[$number]["description"] = "description"; then sorting by the the number will be simple (ksort) Mako Shark wrote:
Wow. This goes way beyond simply printing multidimensional arrays. Here's some sample data: $issue[]["number"] = "number"; $issue[]["headline"] = "headling"; $issue[]["writers"] = "writers"; $issue[]["list"] = "list"; $issue[]["senttosubscribers"] = "0"; $issue[]["month"] = "05"; $issue[]["year"] = "2003"; $issue[]["description"] = "description"; What I need to do now is count(), sort() by number, and loop through this array. I read that PHP is screwy when counting and sorting multidimensional arrays, but they *have* to have come up with a method, right? __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com


« previous php.general (#126428) next »