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

[eluser]CI-Newb[/eluser]
Excellent, thank you both for the replies. How does this look now:

Code:
$parts = explode("-", $code);
        if (count($parts) != 2) {
            $code = NULL;
            $userid = NULL;
        } else {
            $code = $parts[0];
            $userid = $parts[1];
        }

if both parts are not present set both to null which my check will then redirect to the error page. otherwise set them both to the appropriate variables


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