View Single Post
  #5  
Old 06-22-2006, 02:37 PM
JustBreathe JustBreathe is offline
Registered User
Join Date: Jun 2006
Posts: 59
JustBreathe is on a distinguished road
Stefan: Seems like your post was deleted.

( talked about converting to float and bool )

Couldn't you work it out with type() ?
PHP Code:
function eval( var )
  {
  switch( var.
type() )
    {
    case 
0:
      return var != 
false;
    case 
1:
      return var != 
"";
    case 
2:
      return var != 
null;
    case 
3:
      return 
true// ... Just saying it has a type array means it exists!
    
}
  } 
Reply With Quote