我有以下陣列:
$front = array("front_first","front_second");
$back = array("back_first", "back_second", "back_third","back_fourth");
什麼,我試圖做的是輸出合併它們如此像這樣會導致:
$final = array(
"back_first",
"front_first",
"back_second",
"front_second",
"back_third",
"front_second",
"back_fourth",
"front_second"
);
我怎樣才能讓它重複在最短的數組中的最後一個值,以便它可以合併成一個沒有空值的$final[]
?.
是在orderis重要。 – thindery