1 개요[ | ]
- PHP array_replace()
PHP
CPU
0.0s
MEM
22M
0.1s
Copy
$base = ["orange", "banana", "apple", "raspberry"];
$replacements = [0 => "pineapple", 4 => "cherry"];
$replacements2 = [0 => "grape"];
$basket = array_replace($base, $replacements, $replacements2);
print_r($basket);
Array ( [0] => grape [1] => banana [2] => apple [3] => raspberry [4] => cherry )
PHP
CPU
0.0s
MEM
22M
0.0s
Copy
$base = ["orange", "banana", "apple", "raspberry"];
$replacements = [0 => "pineapple", 5 => "cherry"];
$basket = array_replace($base, $replacements);
print_r($basket);
Array ( [0] => pineapple [1] => banana [2] => apple [3] => raspberry [5] => cherry )
2 같이 보기[ | ]
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.
- 분류 댓글:
- PHP (8)
PHP 파일 다운로드 구현 2 (한글 파일명 지원) ― …PHP에서 오라클 DB 사용 ― YoWuPHP 파일 업로드 구현 ― 일리단사오육칠PHP 파일 업로드 구현 ― JmnotePHP 파일 다운로드 구현 2 (한글 파일명 지원) ― AnmkstLib my.php ― 신정섭Lib my.php ― Jmnote로또번호 생성 ―Pinkcrimson