Hi Everybody,
I am learning php multidimension array and i really need help to output the values. I have but could not get it right, any help will be amazing; here is my code.
[php] <?php
session_start();
if (!isset($_SESSION['images'])) {
$_SESSION['images'] = array();
}
if (isset($_POST['submit'])) {
$test[]= $_POST['name'];
$test[]= $_POST['qty'];
$_SESSION['images'][] = $test;
}
foreach ($_SESSION['images'] as $nom) {
foreach ($nom as $val) {
echo $val["name"];
}
}
?>
[/php]
I want to output the values like this one:
name quantity
church 1
Thanks in advance.