php - Checking if the string is empty - Stack Overflow
In your if clause in the function, you're referring to a variable 'strTemp' that doesn't exist. '$strTemp' does exist, though. But PHP already have an empty()-function available, why make your own? if (empty($str)) /* String is empty */ else /* Not empty ...