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 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); ? 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 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); } Link to comment https://forums.phpfreaks.com/topic/65784-undefined-variable-undefine-offset/#findComment-328693 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.