함수 array replace()

Jmnote (토론 | 기여)님의 2016년 2월 1일 (월) 11:23 판 (→‎PHP)
array_merge

1 PHP

{{참고|PHP array_replace()]]

$base = array("orange", "banana", "apple", "raspberry");
$replacements = array(0 => "pineapple", 4 => "cherry");
$replacements2 = array(0 => "grape");

$basket = array_replace($base, $replacements, $replacements2);
print_r($basket);
# Array
# (
#     [0] => grape
#     [1] => banana
#     [2] => apple
#     [3] => raspberry
#     [4] => cherry
# )

2 Ruby

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}