I have a variable called $messagesToUpdate
that holds any and all Messages that have been checked so that an action can be taken on them.
This variable is populated using the implode
function if values were submitted in one of two $_POST arrays.
An example of what this variable would hold if the User selected some Messages to take actions on, would be this...
$messagesToUpdate = 52, 51, 49, 39, 38, 10, 8, 6, 5, 2, 1
So on to my question...
If this variable has at least one value, then I want to run an UPDATE query, but if it is blank then the query should not be run.
What is the best way to check if this variable is blank?
I was starting to use this, but am not sure if it covers all cases...
// Update Selected Messages.
// Do nothing.
I'm unsure what is the best way to check for Blank, Null, Empty, Zero-Length String, etc.