Re: [PHP] default/optional parameters in function

2002-07-03 Thread Analysis & Solutions
On Wed, Jul 03, 2002 at 06:03:59PM -0800, Chris Lott wrote: > On Wed, 3 Jul 2002, Analysis & Solutions wrote: > > > Note use of single quotes around the array key names, as well. > > Why is this better-- I assume because PHP doesn't have to check for > variables to interpolate with single quotes

Re: [PHP] default/optional parameters in function

2002-07-03 Thread Chris Lott
On Wed, 3 Jul 2002, Analysis & Solutions wrote: > On Wed, Jul 03, 2002 at 05:44:28PM -0800, Chris Lott wrote: > > > > I have a function that writes meta tags... if a tag (or tags) is not > > specified, then it gets a default value... is there a cleaner way to > > do this? > > Not that I can think

Re: [PHP] default/optional parameters in function

2002-07-03 Thread Analysis & Solutions
On Wed, Jul 03, 2002 at 05:44:28PM -0800, Chris Lott wrote: > > I have a function that writes meta tags... if a tag (or tags) is not > specified, then it gets a default value... is there a cleaner way to > do this? Not that I can think of. I do have some thoughts, though... > if ($type["desc

[PHP] default/optional parameters in function

2002-07-03 Thread Chris Lott
I have a function that writes meta tags... if a tag (or tags) is not specified, then it gets a default value... is there a cleaner way to do this? function print_pmeta ($type) { if ($type["description"]) { print ''; } else { print ''; } if ($type["keywords"]) { print '';