여기서 거래는 17 개의 요소가있는 배열이 있다는 것입니다. 특정 시간 동안 필요한 요소를 가져 와서 배열에서 영구적으로 제거하고 싶습니다.
코드는 다음과 같습니다.
$name = $post['name'];
$email = $post['email'];
$address = $post['address'];
$telephone = $post['telephone'];
$country = $post['country'];
unset($post['name']);
unset($post['email']);
unset($post['address']);
unset($post['telephone']);
unset($post['country']);
예, 코드는 추악하며 bash 필요가 없습니다. 어떻게하면 더 좋게 만들 수 있습니까?