Declaring variables IS good programming practice.
In PHP one doesn't declare variables, yet, what's possible is to use error_reporting to warn when some variable is being used and that has no previous attributed value.
Attributing a value to a variable is not the same as Declaring a variable.
I think PHP should have some kind of option to DECLARE variables.
You can prevent that error in runtime setting
<?
error_reporting ( E_ALL & ~E_NOTICE )
?>
if I'm not in error that's is the correct sintax to use in this case ..