• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
optional parameters in functions

#4
[eluser]InsiteFX[/eluser]
Hi,

Code:
if (empty($variable)
{
   // variable is empty no value
   dothis;
}
else
{
    // variable has a value
    dothis;
}

// Or you can do a single check like this

if ( ! empty($variable)
{
   // variable has a value
   dothis;
}

Enjoy
InsiteFX


Messages In This Thread
optional parameters in functions - by El Forum - 09-07-2009, 09:07 AM
optional parameters in functions - by El Forum - 09-07-2009, 09:16 AM
optional parameters in functions - by El Forum - 09-07-2009, 09:18 AM
optional parameters in functions - by El Forum - 09-07-2009, 11:41 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.