Re: [PHP] function question

From: Cpt John W. Holmes (holmes072000_at_charter.net)
Date: 10/29/03


To: "Brian V Bonini" <b-bonini@cox.net>, "PHP Lists" <php-general@lists.php.net>
Date: Wed, 29 Oct 2003 17:21:08 -0500

From: "Brian V Bonini" <b-bonini@cox.net>

> function splitPageResults($query, $max_rows, $count_key = '*',
> $page_holder = 'page') {
>
> Am I wrong in assuming that $count_key is being explicitly set to '*' in
> this instance?

Only if no value is passed when the function is called.

splitPageResults('some query',32)

will result in $count_key and $page_holder getting the defaults listed.

splitPageResults('some query',32,'foo','bar')

will now results in $count_key => foo and $page_holder => bar

More examples in the manual, I'm sure...

---John Holmes...