PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
echo $_SESSION['aonidii2lk333']; // no, this variable name does not exist
my script won't explode. I don't even get any errors. However, I'm not sure having references to nonexistant variables is good coding practice. Should I check to see if it exists before I echo it _no matter what_?
Using variables that do not exist will fire notices. You probably aren't seeing the notices because your error reporting is set too low. You should always be coding with
//bad
while ($something)
{
$string .= $foo;
}
//good
$string = '';
while ($something)
{
$string .= $foo;
}
//bad
while ($something)
{
$array[] = $foo;
}
//good
$array = array();
while ($something)
{
$array[] = $foo;
}
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.