blackcell Posted August 12, 2008 Share Posted August 12, 2008 Can someone clarify on the functions like unset() set() empty() is_empty(). Basically I am needing to know which functions to use to do the following on CONSTANTS, variables and arrays: 1. Check to see if it is empty. 2. Empty(unset) the data type. Link to comment https://forums.phpfreaks.com/topic/119334-clarification-on-set-unset-empty/ Share on other sites More sharing options...
trq Posted August 12, 2008 Share Posted August 12, 2008 This is all covered in the manual, I just don't see how were going to give you any clearer explination. Link to comment https://forums.phpfreaks.com/topic/119334-clarification-on-set-unset-empty/#findComment-614722 Share on other sites More sharing options...
unkwntech Posted August 12, 2008 Share Posted August 12, 2008 http://www.php.net/functionName Link to comment https://forums.phpfreaks.com/topic/119334-clarification-on-set-unset-empty/#findComment-614726 Share on other sites More sharing options...
blackcell Posted August 12, 2008 Author Share Posted August 12, 2008 I looked in the "manual" and didn't understand how to utilize the functions with the provided explanation. Maybe I wasn't looking at the correct function and am at a loss for further ideas because I have never used the needed functions. Maybe I am struck by a case of functional fixedness. Whatever the case may be, I spent the time looking in the "manual" because I wanted to avoid useless posts advising on how I should read to find it rather than post something stupid. I am sure it would have taken 10 seconds less to type: Check for set = function() Unset = function() strlen() = 45 rather than: This is all covered in the manual, I just don't see how were going to give you any clearer explination. strlen() = 103 By the way unkwntech, your link is pointless. http://www.php.net/functionName I hate to be rude thorpe. But this is more than one instance where I have looked, couldn't find the answer, and received the same useless response from a moderator. The answer to 95% of everything can be found on the web. If people should always check the web, then what is the use of community forums? Link to comment https://forums.phpfreaks.com/topic/119334-clarification-on-set-unset-empty/#findComment-614815 Share on other sites More sharing options...
trq Posted August 12, 2008 Share Posted August 12, 2008 isset() checks if a variable exists. empty() checks to see if an existing variable contains a value. The other two functions you mention do not exist. Link to comment https://forums.phpfreaks.com/topic/119334-clarification-on-set-unset-empty/#findComment-614821 Share on other sites More sharing options...
blackcell Posted August 12, 2008 Author Share Posted August 12, 2008 Thank you very much I think that solves my entire predicament. unset() And yes is_empty is totally non-existent. I don't know what I was thinking. Link to comment https://forums.phpfreaks.com/topic/119334-clarification-on-set-unset-empty/#findComment-614825 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.