[Gllug] mySQL PHP

Dave Cridland dave at cridland.net
Wed Jul 11 11:25:10 UTC 2001


On 10 Jul 2001 19:38:15 +0100, Bruce Richardson wrote:
> On Tue, Jul 10, 2001 at 07:10:43PM +0100, Bruce Richardson wrote:
> > 	$var1 = $var1 ? $var : "default value";
> 
> Sorry: 
> 
>  	$var1 = $var1 ? $var1 : "default value";
> 
> -- 
> Bruce
> 
> Bitterly it mathinketh me, that I spent mine wholle lyf in the lists
> against the ignorant.  -- Roger Bacon, "Doctor Mirabilis"

Although, in my quest for code that tells the programmer what's really
going on, I'd be more specific:

if( !isset( $var ) ) {
	$var = $var_default;
}

Dave.

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list