I'm experimenting with a multidimensional array in PHP with strings as values. I want to echo all the values of one single column, instead of all values of all columns.
First i create the array!
$test = array
(
array("hoge", "bomen", "vangen"),
array("moeten", "we", "rekening"),
array("voor", "deze", "tijd")
); ``
This foreach outputs all the values!
foreach ($test as $val) {
echo "$val" . "<br/>";
}
How can i output only the values of column 2? instead of the values of all the columns.
I want this output:
bomen
we
deze
echo $val[0]for the first one, etc...