In the interests of proper coding, I was wondering what's the best syntax for checking whether a variable exists/is set?
if ($variable) {
[do something]
}
if (isset($variable)) {
[do something]
}
if ($variable != null) {
[do something]
}
if ($variable != "")
[do something]
}
This applies both to variables set within a script and values returned from a database (e.g. "if ($myrow['variable'])")
Thanks!