nobrain Posted April 22, 2010 Share Posted April 22, 2010 I have this code: if (!$value) { $ok=0; break; } It is supposed to check if a variable is not empty and, if it is, then fail. The problem is that sometimes the variable is 0 -- then it also fails. I need it to fail if the variable is empty but not if it has a value of 0. Thanks! Link to comment https://forums.phpfreaks.com/topic/199409-simple-variable-check-problem/ Share on other sites More sharing options...
nobrain Posted April 22, 2010 Author Share Posted April 22, 2010 Thought is was simple, guess not? Link to comment https://forums.phpfreaks.com/topic/199409-simple-variable-check-problem/#findComment-1046574 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.