A
A
Aidar2018-01-28 15:30:05
PHP
Aidar, 2018-01-28 15:30:05

How to select the first value from an array?

There is an array:

Array ( [0] => Заголовок1 ) Array ( [0] => Заголовок2 )

How do I get "Header1" at this stage? And since Are the indexes the same and are both displayed?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Arman, 2018-01-28
@Arik

echo $arr[0][0];

F
fman2, 2018-01-28
@fman2

This cannot be, you most likely have an array of the form:

[
 ["Заголовок1"],
 ["Заголовок2"]
]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question