Welcome Guest, Not a member yet? Register   Sign In
Multi-Dimensional Array Help
#9

[eluser]jwindhorst[/eluser]
@jcargilo

I too think it's a personal preference. I don't think there is anything "wrong" with either method. using my method you at least see what the name of the parent array is. I think I used cat_items above. Regardless you can see that without knowing what is inside the array you're looping over. Therefore you can easily do:
Code:
echo '<pre>';
print_r($cat_items);
echo '</pre>';
then you would see what is stored in your categories and what items are associated with each. With the PBR you won't know what those base level array's are called since they generated on the fly in the loop.

Works is works at the end of the day though!


Messages In This Thread
Multi-Dimensional Array Help - by El Forum - 03-21-2012, 04:57 PM
Multi-Dimensional Array Help - by El Forum - 03-21-2012, 08:05 PM
Multi-Dimensional Array Help - by El Forum - 03-21-2012, 08:07 PM
Multi-Dimensional Array Help - by El Forum - 03-21-2012, 08:44 PM
Multi-Dimensional Array Help - by El Forum - 03-21-2012, 08:51 PM
Multi-Dimensional Array Help - by El Forum - 03-21-2012, 10:58 PM
Multi-Dimensional Array Help - by El Forum - 03-22-2012, 09:23 AM
Multi-Dimensional Array Help - by El Forum - 03-22-2012, 01:43 PM
Multi-Dimensional Array Help - by El Forum - 03-22-2012, 02:03 PM



Theme © iAndrew 2016 - Forum software by © MyBB