|
Posted by Mike P2 on 05/11/07 20:28
On May 11, 1:28 am, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
> Mike P2 wrote:
> > This will allow you to use more than one candidate as you mentioned,
> > and PHP will not issue a notice this way.
>
> That's quite clever code, but it will only work when called from the
> global scope.
>
> --
> Toby A Inkster BSc (Hons) ARCShttp://tobyinkster.co.uk/
> Geek of ~ HTML/SQL/Perl/PHP/Python/Apache/Linux
Then I think using a function for this, although it would be useful,
is hopeless without making a PHP extension in C++. Maybe this could be
a suggestion to the PHP developers as a keyword in the future.
Oh well, at least we can safely do it in global scope. I don't use
globals in functions much anyway. Besides, using a function to do this
is less efficient performance-wise than using ternary operators and
isset().
Back to the point of this topic, your problem has been solved and you
can move on with your (PHP) life.
-Mike PII
[Back to original message]
|