I am working with PHP,I have array and i want to change position of array, i want to display matching value in first position,For example i have following array
$cars=('Toyota','Volvo','BMW');
And i have variable $car="BMW" And i want to match this variable with array and if match then this array value should be at first in array so expected result is (matching record at first position)
$cars=('BMW','Volvo','Toyota');
How can i do this ?
[], not parentheses().