Ok, I have a multidimensional array that is populated dynamically via an API. Users can enter in arrays of information that are transformed into a multidimensional array, which would look something like this:
$object = array(
array(
'key1' => 'value 1',
'key2' => 'value2'
),
array(
'key1' => 'value1',
'key2' => 'value2'
)
);
Next, I've been running a foreach loop to grab all the information I need, and everything works great. But here's the issue I'm running into - each array on information will output a block of info within a
tag. If 5 arrays are inputted, that's way too many blocks of information. Each array has many different if/else checks which is what is throwing me off. I can't simply break after the first foreach loop because I need to grab all the information from each array.Basically what I am asking is how can I loop through an entire multidimensional array and only output one bit of information?
I hope what I am asking makes sense. If not, let me know and I will try to explain more. This is more of a conceptual question for me.