M
M
McMike2018-04-21 09:08:32
PHP
McMike, 2018-04-21 09:08:32

How to get the key-value of an array?

Suddenly a very stupid question came up. There is an array with one element ['key' => 'value'] how to get these key/value into variables? Usually we bypass such arrays with a foreach loop, but there is obviously one element here.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis, 2018-04-21
@McMike

php.net/manual/en/function.key.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question