U
U
Uzair Izha2015-10-10 15:07:58
PHP
Uzair Izha, 2015-10-10 15:07:58

How to display the values ​​of a two-dimensional array?

I have an array $a['salon'] - it has values ​​1,2,3,4.... in total 10 values, how to output one value from it? in a cycle.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DrunkMaster, 2015-10-10
@DrunkMaster

var_dump array to studio most likely

echo "$a['salon'][$i]";
//или
echo "$a[$i]['salon']";

I
Ivanq, 2015-10-10
@Ivanq

foreach($a['salon'] as $i=>$v) {
    echo "$i: $v<br>\n";
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question