My question is,
I have a variable and this holds a list of elements – ie. indexed array.
var $myarr;
//added smt. to array..
...
$myarr = Array();
Where myarr’s elements go?
Which one is best, above or below?
Shall I equalize to NULL before to equalize Array()?
var $myarr;
//added smt. to array..
...
$myarr = NULL;
$myarr = Array();
$myarr = Array()will set the value of the variable$myarrto an empty array. It does not matter what was there before, whatever it was it is now gone*. There’s no difference with first setting$myarrtonull, it’s just one more (pointless) step. It does not change anything about the outcome.* or at the very least will be garbage collected sometime soon