这里的问题是,我有一个包含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']);
是的,代码是丑陋的,没有必要大肆抨击。我怎样才能让它看起来更好?
https://stackoverflow.com/questions/7884991
复制相似问题