Hi,
have an array in PHP, and I want to clear all values.
Actually empty it. Like it is new.
clear array from values
Re: clear array from values
you can set it to null
or re-initialize it:
Or if you don't need it anymore,
you can "destroy" it:
PHP will clean up its memory
(when it needs to. I don't think it does it immediately)
Code: Select all
$foo = null;
or re-initialize it:
Code: Select all
$foo = array();
you can "destroy" it:
Code: Select all
unset($foo);
(when it needs to. I don't think it does it immediately)
Re: clear array from values
Thanks, I'll test it