OK, I have a problem calling a function using default variables.

In 'gallery.inc':
---------------------------------
function gallery ($filename, $first = 1, $tablewidth = 4, $total = 20) {
    echo "Filename: $filename, First image: $first, Table Width:
$tablewidth, Total: $total";
}
---------------------------------

In 'gallery.php':
---------------------------------
include('/path/to/gallery.inc');
...
gallery('test.txt',$first,$width,$images);
---------------------------------

$first, $width and $images are variables that are defined by the URL, as if
they were submitted through a form using HTTP GET, and they are designed to
be used like that.

My problem is, if I don't define those variables in the URL when I run
gallery.php, PHP will come back with 'Undefined Variable' errors. Is there
any way I can prevent that from happening?

TIA!

--
Uchendu Nwachukwu
unndunn AT yahoo DOT com - www.unndunn.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