Now I have
$data = array("red", "green", "blue", "yellow");
$found = "green";
$expand1 = "apple";
$expand2 = "other";
if $data = array("red", "green", "blue", "yellow"); //[1]=>"green"
I want get the new array look like this
$result = array("red", "apple","other", "blue", "yellow");
if $data = array("green", "blue", "yellow","red");//[0]=>"green" beginning
I want get the new array look like this
$result = array("apple","other", "blue", "yellow","red");
if $data = array("blue", "yellow","red","green");//[3]=>"green" the end
I want get the new array look like this
$result = array("blue", "yellow","red","apple","other");
Anyboday know the sulotion.please.
thanks