Re: [Phplib-users] Re: php 4.2.1
Brought to you by:
nhruby,
richardarcher
|
From: Marko K. <Mar...@mc...> - 2002-06-05 08:26:19
|
Hi Daniel, > I had the same problem when I upgraded to 4.1. I see. > $foo is an array > unset($foo) does not work same symptom. > $foo = array() does work. Oh gosh, life can be so easy. I actually tried the same, but BEFORE this array() assignment I did a unset($foo), where $foo was a variable defined as global inside that function. That obviously caused that the variable disappeared in global namespace and was just locally created with array(). So eventually I came to this solution: for($j=0;$j<count($ExpNames);$j++) unset($ExpNames[$j],$ExpNr[j]); unsetting each element of the array. It works! But of course your solution is so much nicer. ;) Thanks for the hint! Marko |