編集パスワード   でロック
タイトル
コメント
添付ファイル
(500MBまで)
番号順に表示 追加順に表示
配列関数 2017年02月08日 20:48   編集
配列の一部を展開する
元の配列は変わらない。
$input = array("a", "b", "c", "d", "e");

$output = array_slice($input, 2); // "c", "d", "e" を返す
$output = array_slice($input, -2, 1); // "d" を返す
$output = array_slice($input, 0, 3); // "a", "b", "c" を返す
counter:2,894