A
A
Andrey Angelovich Stock2018-04-26 16:43:58
PHP
Andrey Angelovich Stock, 2018-04-26 16:43:58

How to print the values ​​of a specific key from an array?

Hello. There is an array. I ask you not to pay attention to the values ​​of the array elements.

Array ( [0] => Array ( [id] => 14 [c_name] => toto [url] => Array[13][url] [repetition] => Array[13][repetition] [ton] => Array[13][ton] [type] => Array[13][type] [date] => 12.04.2018 ) [1] => Array ( [id] => 15 [c_name] => toto [url] => Array[14][url] [repetition] => Array[14][repetition] [ton] => Array[14][ton] [type] => Array[14][type] [date] => 12.04.2018 ) [2] => Array ( [id] => 16 [c_name] => toto [url] => Array[15][url] [repetition] => Array[15][repetition] [ton] => Array[15][ton] [type] => Array[15][type] [date] => 26.04.2018 ))

The array has [date] with values. It is necessary to group and display these values ​​so that you can understand what kind of [date] values ​​there are. That is, it should turn out something like
toto - 04/12/2018
toto - 04/26/2018
and so on.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Angelovich Stock, 2018-04-26
@your_uncle

thanks everyone! he decided everything. I ran through the array and formed a separate array with [date], and then using array_unique I selected all the unique values.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question