On Tuesday 04 March 2003 18:24, Christian Bartels wrote: > Ok, but how do i pass the vars to the second function (foo2)? > There is not a fixed number of parameters (and so fields in the $params > array).
You can do something along these lines: function doo($args) { // these are the default values for your args $element_name = ''; $method = 'post'; $upload = FALSE; $return = FALSE; if (is_array($args)) { extract($args); } // You can also check whether a required parameter was given: if (!isset($required_parameter)) { echo "Error blah blah blah ..."; } ... your code } -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* Those lovable Brits department: They also have trouble pronouncing `vitamin'. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php