Answers for "get key based on value php array"

PHP
1

get specific key value from array php

$ids = array_column($users, 'id');
Posted by: Guest on January-15-2021
1

php find key in array

<?php
$search_array = array('first' => 1, 'second' => 4);
if (array_key_exists('first', $search_array)) {
    echo "The 'first' element is in the array";
}
?>
Posted by: Guest on June-23-2021

Code answers related to "get key based on value php array"

Browse Popular Code Answers by Language