[thelist] Q on PHP array manipulations...

sbeam sbeam at syxyz.net
Fri Jul 9 06:52:52 CDT 2004


On Friday 09 July 2004 03:28 am, jsWalter wrote:
> Does anyone here know if PHP has a built-in function to "flip" an
> array?
>

http://us3.php.net/array_flip

> Meaning, rows become columns and columns become rows.

arrays don't have columns or rows. They have keys and values. So I'm not 
sure what you meant by that, but in any case if array_flip() isn't what 
you need then there is definitely another way to do it.

<rant type="pointless">
PHP has about 20 built-in little array_*() functions which IMO is mostly 
a waste of resources - like array_change_key_case() - huh?? why is that 
built into my interpreter? any compentent programmer could crib that 
function together in 1 minute...
</rant>


-- 

# S Beam - Web App Dev Servs
# http://www.onsetcorps.net/


More information about the thelist mailing list