运行 ❯
获取
您的 PHP
服务器
×
更改方向
更改主题,暗/亮
前往空间
<!DOCTYPE html> <html> <body> <pre> <?php $cars = array("brand" => "Ford", "model" => "Mustang", "year" => 1964); $newarray = array_diff($cars, ["Mustang", 1964]); var_dump($newarray); ?> </pre> </body> </html>
array(1) { ["brand"]=> string(4) "Ford" }