I need to check if variables are set to something. Up till now I have been using strlen(), but that is really embarrassing as I am pretty sure that is not a very efficient function to be using over an over again.
How do I perform this sort of check more efficiently:
if (strlen($_GET['variable']) > 0)
{
Do Something
}
Note that I don't want it to do anything if $_GET['variable'] = ''
Just to clarify what I mean - If I had www.example.com?variable=&somethingelse=1
I wouldn't want it to penetrate that if statement