"David Robley" <[EMAIL PROTECTED]> wrote:
> The specific answer to your question is that the variable $birthday is
> local to the function - check out variable scope in the manual.
>
> But in fact there is another way of doing it - pass the values to check as
> parameters to the function and have it return a result, thus:
>
> function CheckBirthday($year,$month,$day) {

This is a good solution for something this simple.  [to original poster:] If
you're comfortable jumping into learning OOP (object oriented programming)
you can use classes.  There are plenty of good tutorials on classes (b/w
phpbuilder.com, devshed and zend you should be set).  Classes have a lot of
benefits which I won't go into, but one benefit is that it easy to use
related functions seamlessly and it's easy to create variables which are
accessible by all functions within the class (a class is essentially a
collection of functions that can talk with one another).

--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.817.2470
http://www.247computing.com/


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

Reply via email to