[support] Tableselect in forms issue

Earnie Boyd earnie at users.sourceforge.net
Fri Sep 14 11:39:18 UTC 2012


On Thu, Sep 13, 2012 at 8:42 PM, Kamal Palei wrote:
> But from above prints, one thing is clear while I have selected 0th row, 0th
> element is
> 0 (String, 1 characters ) 0 and when 0th row is not selected, it looks as 0
> (Integer) 0  , (please note the difference here) hence, there should be
> someway to determine if 0th row is selected or not. I am not a PHP expert ,
> so probably missing something here.
>
> Can somebody kindly help here, how do I determine if the 0th row is selected
> or not.

There is probably a more correct way to do what you want but I don't
have time to research it so I'm just answering based on your data.

if ($myarray[0] === 0) {
  $myarray_0_isset = FALSE;
}
else {
  $myarray_0_isset = TRUE;
}

-- 
Earnie
-- https://sites.google.com/site/earnieboyd


More information about the support mailing list