Welcome Guest, Not a member yet? Register   Sign In
Undefined offset . How to rid this error?
#5

[eluser]vitoco[/eluser]
it works, but i'm used to set defaults outside conditionals, like this
Code:
$parts = explode("-", $code);
// DEFAULTS
$code = NULL;
$userid = NULL;
// CORRECT CONDITION
if (count($parts) == 2)
{
    $code = $parts[0];
    $userid = $parts[1];          
}

Slds



Messages In This Thread
Undefined offset . How to rid this error? - by El Forum - 08-14-2012, 01:55 PM
Undefined offset . How to rid this error? - by El Forum - 08-14-2012, 02:07 PM
Undefined offset . How to rid this error? - by El Forum - 08-14-2012, 02:08 PM
Undefined offset . How to rid this error? - by El Forum - 08-14-2012, 02:13 PM
Undefined offset . How to rid this error? - by El Forum - 08-14-2012, 02:17 PM
Undefined offset . How to rid this error? - by El Forum - 08-14-2012, 02:37 PM
Undefined offset . How to rid this error? - by El Forum - 08-14-2012, 10:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB