[PHP] function question

2003-10-29 Thread Brian V Bonini
 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?

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



Re: [PHP] function question

2003-10-29 Thread CPT John W. Holmes
From: Brian V Bonini [EMAIL PROTECTED]

 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...

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



[PHP] Function Question

2001-05-18 Thread Michael O'Neal

Hi.  I'm hoping you folks can help me with a function problem I have.  
Take a look at the following code:

?

?php 
function fill_page($title) {

?



html
head
title?php echo $title; ?/title


?php

}
?

I have a page divided into 3 sections.  A header include, the content, 
and a footer include.
I have a function (fill_page) that lives in the header include that has 
it's variable defined in the content page.  As you can see, the function 
above will fill $title with whatever is defined in the content page.  
i.e.  fill_page(This is the title)

What I want to do is use that $title variable *outside the function, a 
little further down the page.  I've played around with the ampersand 
before the dollar sign, and using a global variable, all with no success. 
 

It seems to me that this should be simple, and I think I'm 
overcomplicating it.  Here's what I'm trying to do:

1. Get a string of text from the individual content pages.
2. Use that string in the Title of the html page
3. Use the same string as the header of the content page.

I'm sorry I'm being stupid about it...but I've made it harder than it 
probably is.

Please respond to [EMAIL PROTECTED] as I am on the digest.

Thanks in advance.

mto


Michael O'Neal
Web Producer/ Autocrosser
ST 28 '89 Civic Si
-
 M   A   N   G   O
B  O  U  L  D  E  R 
-
http://www.thinkmango.com
[EMAIL PROTECTED]
p-303.442.1821
f-303.938.8507



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]