swaping numerical index for keys
| From: | Pooly | Date: | Fri, 25 Nov 2005 21:26:45 +0000 |
| Subject: | swaping numerical index for keys | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-226431@lists.php.net to get a copy of this message | ||
Hi,
I've an array :
$ls_statfields=array(
"rfile" =>0,
"file" =>1,
"dev" =>2,
"ino" =>3,
"mode" =>4,
"nlink" =>5,
"uid" =>6,
"gid" =>7,
"rdev" =>8,
"size" =>9,
"atime" =>10,
"mtime" =>11,
"ctime" =>12,
"blksize" =>13,
"blocks" =>14
);
Which is the correspondance between the numerical and keys for stat
before PHP 4.0.6 :
http://uk.php.net/manual/en/function.stat.php
What would be the fastest solution to transform the result from stat
to the one with the keys (before 4.0.6 :-) ? (i.e. Exchanging
numerical indexing the for hash keys in the ls_statfields ?)
--
Pooly
Webzine Rock : http://www.w-fenec.org/