I'm just wondering if there is a quick way to echo undefined variables without getting a warning? (I can change error reporting level but I don't want to.) The smallest I have so far is:
isset($variable)?$variable:''
I dislike this for a few reasons:
- It's a bit "wordy" and complex
$variable
is repeated- The echoing of a blank string always kind of annoys me.
- My variable names will probably be longer, eg
$arrayvar['parameter']