This is probably a very easy question for most of you, but its confusing me (still a beginner)
I want to learn about functions so i am doing something simple here: I just want to display today's date and time on the screen using my own function. here is what i did
function datedisplay($todays_date, $todays_time)
{
// get current time and date
$todays_date = date ("m") . "-" . date("d") . "-" . date("Y");
$timestamp1 = date("G");
$timestamp2 = date("i");
$timestamp3 = date("s");
$todays_time = $timestamp1 . ":" . $timestamp2 . ":" . $timestamp3;
return $todays_date;
return $todays_time;
}
Then i call the function like this:
datedisplay($todays_date,$todays_time);
echo $todays_date;
echo "\n";
echo $todays_time;
and nothing prints to the screen...
thanks for any help