dg Posted August 20, 2007 Share Posted August 20, 2007 hi ... i m getting this error whilre doing the below code function abc ($test='') { if ($test) list($a, $b) = explode('|', $test); } pls help urgent ...... thanx Quote Link to comment https://forums.phpfreaks.com/topic/65784-undefined-variable-undefine-offset/ Share on other sites More sharing options...
MrBillybob Posted August 20, 2007 Share Posted August 20, 2007 are you having something equal to the function...$var1 = abc($test); ? Quote Link to comment https://forums.phpfreaks.com/topic/65784-undefined-variable-undefine-offset/#findComment-328648 Share on other sites More sharing options...
dg Posted August 20, 2007 Author Share Posted August 20, 2007 no ... actually it's a constructor ... so is called on load of the php file Quote Link to comment https://forums.phpfreaks.com/topic/65784-undefined-variable-undefine-offset/#findComment-328651 Share on other sites More sharing options...
itsmeArry Posted August 20, 2007 Share Posted August 20, 2007 try this out: function abc ($test=array()) { if (!empty($test)) list($a, $b) = explode('|', $test); } Quote Link to comment https://forums.phpfreaks.com/topic/65784-undefined-variable-undefine-offset/#findComment-328693 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.