Possible Duplicate:
Combing 3 arrays into one array
I have the following arrays:
$front = array("front_first","front_second");
$back = array("back_first", "back_second", "back_third","back_fourth");
what I'm trying to do is merge them so an output like this would result:
$final = array(
"back_first",
"front_first",
"back_second",
"front_second",
"back_third",
"front_second",
"back_fourth",
"front_second"
);
How can I have it repeat the last value in the shortest array so that it can combine into one $final[]
with no empty values?.