This code is behaving as expected. "if ($item)" is true, as long as $item is defined and has a value other than number 0, the string '0' or the string ''.
So we'll need something closer to your actaul code to understand what you're trying to accomplish --Bob Niederman, http://bob-n.comIn reply to Re: Changing each item in an array
by bobn
in thread Changing each item in an array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |