Welcome Guest, Not a member yet? Register   Sign In
New Associative Array?
#11

[eluser]xwero[/eluser]
[quote author="kriztofor" date="1227666885"]$includes is not an associative array, so you can't use $key => $val. Try
Code:
<?php
foreach ($includes as $val){
    echo "$key\n";
}
?>
[/quote]
This is a wrong assumption. Every array item has a key, an associative array has words as keys where a normal array has numeric keys.


Messages In This Thread
New Associative Array? - by El Forum - 11-25-2008, 12:28 PM
New Associative Array? - by El Forum - 11-25-2008, 12:38 PM
New Associative Array? - by El Forum - 11-25-2008, 01:00 PM
New Associative Array? - by El Forum - 11-25-2008, 01:26 PM
New Associative Array? - by El Forum - 11-25-2008, 01:38 PM
New Associative Array? - by El Forum - 11-25-2008, 02:11 PM
New Associative Array? - by El Forum - 11-25-2008, 02:23 PM
New Associative Array? - by El Forum - 11-25-2008, 02:34 PM
New Associative Array? - by El Forum - 11-25-2008, 02:52 PM
New Associative Array? - by El Forum - 11-25-2008, 08:09 PM
New Associative Array? - by El Forum - 11-26-2008, 01:24 AM
New Associative Array? - by El Forum - 11-26-2008, 06:09 AM
New Associative Array? - by El Forum - 11-26-2008, 09:47 AM
New Associative Array? - by El Forum - 12-08-2008, 12:36 PM
New Associative Array? - by El Forum - 12-08-2008, 12:54 PM
New Associative Array? - by El Forum - 12-08-2008, 01:39 PM
New Associative Array? - by El Forum - 12-08-2008, 01:40 PM
New Associative Array? - by El Forum - 12-08-2008, 01:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB