The thing is though, the values in '23' will change, and there very well could be more than 2 iterations within that 465. So, in the case of the example below, the first string would like this:
'Option Number = 465, Option Name = CHTZMO / DYUIOP / YTRION'
And the second:
'Option Number = 568, Option Name = CHTZMO / PLOIYU'
I'm trying to output the following strings based on the array below, but can't figure out how to group the values together:
'Option Number = 465, Option Name = CHTZMO / DYUIOP';
'Option Number = 465, Option Name = CHTZMO / PLOIYU';
Array
(
[23] => Array
(
[aid] => Item A
[gid] => 1
[po] => Array
(
[465] => Array
(
[0] => Array
(
[itemid] => 884
[value] => CHTZMO
[identifier] => 98765
[gp] => 187
[type] => select
[attid] => 1086
)
[1] => Array
(
[itemid] => 884
[value] => DYUIOP
[name] => 98765
[gp] => 187
[type] => select
[attid] => 1497
)
[2] => Array
(
[itemid] => 884
[value] => YTRION
[name] => 98791
[gp] => 187
[type] => select
[attid] => 1797
)
[3] => Array
(
[itemid] => 884
[value] => FYNOPO
[name] => 98891
[gp] => 187
[type] => select
[attid] => 8797
)
)
[568] => Array
(
[0] => Array
(
[itemid] => 884
[value] => CHTZMO
[identifier] => 98765
[gp] => 187
[type] => select
[attid] => 1086
)
[1] => Array
(
[itemid] => 884
[value] => PLOIYU
[name] => 98769
[gp] => 187
[type] => select
[attid] => 1765
)
)
)
)
)
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83:





by: wildzeroPosted on 2008-10-21 at 03:06:14ID: 22765706
Are all the items going to be under the elemnt
[po] => Array ?
So...
Foreach ($myarray['23']['po'] as $key=>$details) {
echo "Option Number = " . $key . " Option Name = " . $details[0]['value'] . "/" . $details[0]['value'] . "\n<br />";
}
Are you able to display more of the array? I don't see a 568...