php array get value at index example code

php array get value at index example code

php array get value at index example

php array get value at index example in php

$array = array(0 => 'blue', 1 => 'red', 2 => 'green', 3 => 'red');

$key = array_search('green', $array); // $key = 2;
$key = array_search('red', $array);   // $key = 1;
By Manish Salunke In php -

Tags:

php

Sponsors

themeforest
pluralsight
Invest in you. Online courses as low as $11.99