Re: [PHP] UNLESS Statement Equivalent

[email protected] (Angela Barone)
Newsgroups php.general
Message-ID <[email protected]>
On Mar 11, 2013, at 4:10 PM, Jonathan Sundquist wrote:
> the variable $current_page does not exist. 

	That was my problem. :(  I've been staring at this for too long.  Too bad there's not a 'use strict' pragma.

> I would also suggest keeping with your original statement to return early and return often. Its best to exit out of your functions sooner than later.  Specially if its a large function.

	O.K.  I just thought there might be a more elegant way of doing it.  I at least got rid of the else statement like you mentioned.

Thanks for your help,
Angela
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.