View Full Version : Need help with variables/includes

03-04-2007, 06:38 PM
I have two php pages, the first of which has a "config section"

In the config section of the first page, I would like to have the ability to designate a variable f or c, which would change the $units='f', which is in a function on the second page here:

function getWeather($zip, $units='f') {

Help! :)

03-04-2007, 08:35 PM
Just set the variable(say $default_unit):

$default_unit = 'f';
and change the function call to:

getWeather($zip, $default_unit);