When I echo the array , result is :
$Items = Array( [147] => Array([ItemName] => Array([0]=>White Snack [1]=>Dark Cookie) [ItemCode] => Array([0]=>IT-WS [1]=>IT-DC ) ) [256] => Array([ItemName] => Array([0]=>Soft Sandwiches [1]=>Hard Drinks) [ItemCode] => Array([0]=>IT-SS [1]=>IT-HD ) ))
Now I need to display the following result in a tabular form , the indexes 147 and 256 , I would pass them from a separate foreach loop so as to get the correct index value.
-----------147---------------
Name ----------------------------------- Code
White Snack --------------------------- WS
Dark Cookie --------------------------- DC
-----------256---------------
Name ----------------------------------- Code
Soft Sandwiches ---------------------- SS
Hard Drinks ---------------------------- HD
Am not able to achieve this. Please help.
$ItemIndexes = array(147,256);
foreach($ItemIndexes as $ItemMainIndex)
{
//further code here ,
//here I would send the $ItemMainIndex to the $Items array
//and get the corresponding index value and display it accordingly.
}