onedumbcoder Posted July 29, 2009 Share Posted July 29, 2009 i have a function that returns either an array or nothing. so lets say it returns an array $list = getList(); then would $list no longer be empty? !empty($list) == true or would it still be empty and would I need to do this instead !empty($list[0]) == true what if it does not return anything: getList(){ return; } would list not be set so that this would be false: isset($list) Link to comment https://forums.phpfreaks.com/topic/167900-if-i-return-a-null-is-the-variable-empty-or-not-set/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.