I have two arrays stored in single variable i want to retrieve data via for-each loop, problem is name
index is giving error. Please view below code.
Array
Array
(
[name] => special
[Cat_id] => 59
)
Array
(
[singleproduct] => Array
(
[product_id] => 52
[thumb] => http://localhost/swefloraProject/upload/image/cache/catalog/birthday/home-product-01-80x80.png
[name] => gift flowers
[description] => when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has ..
[price] => $0.00
[special] =>
[tax] => $0.00
[minimum] => 1
[rating] => 0
[href] => http://localhost/Project/upload/index.php?route=product/product&product_id=52
)
)
This is loop
foreach($categories as $category){
print_r($category['name']);
}
Error
Notice: Undefined index: name in