是否有內置的php函數或將元素插入到數組的開頭的簡單方法?將一個元素添加到數組的開頭php
類似:
$matches = Array("apples", "oranges");
insert_to_beginning($matches, "peach");
內容:
$matches[0] = peach
$matches[1] = apples
$matches[2] = oranges
是否有內置的php函數或將元素插入到數組的開頭的簡單方法?將一個元素添加到數組的開頭php
類似:
$matches = Array("apples", "oranges");
insert_to_beginning($matches, "peach");
內容:
$matches[0] = peach
$matches[1] = apples
$matches[2] = oranges
嘿,我是第一個! ;-) – zerkms
@zerkms:嘿,我提供了一個非特定於語言環境的鏈接! (是的,我知道你是第一個,嘆氣。) – Ryan