On Fri, 2004-02-06 at 10:51, Cameron B. Prince wrote:
> I'm creating some strings from array elements obviously. The issue is, the
> array elements don't always exist depending on which function you are
> running. And when they don't, the server log is full of undefined index
> errors. Is there a way I can avoid these errors without adding a
> "if(isset(...))" around each one?

If you know which variables are required per 'function' that is being
called wrap an if around these variable declarations in blocks.  You
will still have ifs, but you should have a lot fewer.  If by function
you mean actual functions then you could move these lines to the top of
their respective functions.

-- 
Adam Bregenzer
[EMAIL PROTECTED]
http://adam.bregenzer.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to