Horje
search value from 2 Dimension array Code Example
search value from 2 Dimension array
$a = array(
        array(
        'id' => 5698,
        'first_name' => 'Peter',
        'last_name' => 'Griffin',
        ),
        array(
        'id' => 4767,
        'first_name' => 'Ben',
        'last_name' => 'Smith',
        ),
        array(
        'id' => 3809,
        'first_name' => 'Joe',
        'last_name' => 'Doe',
        )
    );

print_r($a);
//search first name of the user "Ben"
$firstnameArray = array_column($a,"first_name");
$value = array_search("Ben",$firstnameArray);
print_r($a[$value]);
die;




Whatever

Related
ex: btc address Code Example ex: btc address Code Example
can you earn from grepper Code Example can you earn from grepper Code Example
atcg full form Code Example atcg full form Code Example
difference between iqueryable and ienurable Code Example difference between iqueryable and ienurable Code Example
what to consider when writing api document Code Example what to consider when writing api document Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7