Call to endefined function error
| From: | shaun | Date: | Tue, 22 Apr 2003 16:30:57 +0000 |
| Subject: | Call to endefined function error | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-144862@lists.php.net to get a copy of this message | ||
Hi,
I have the following class:
<?php
class MyCalendar extends Calendar
{
function getCalendarLink($month, $year){
$s = getenv('SCRIPT_NAME');
return "$s?month=$month&year=$year&goto_date=yes";
}
function pad($s, $n){
$r = $s;
while (strlen($r) < $n){
$r = "0".$r;
}
return $r;
}
function getDateLink($day, $month, $year)
{
$d = pad($day, 2);
$m = pad($month, 2);
$y = pad($year, 4);
$s = getenv('SCRIPT_NAME');
return "$s?day=$d&month=$m&year=$y&goto_date=yes";
}
}
?>
However i keep getting the following error:
Fatal error: Call to undefined function: pad() in
/home/w/o/workmanagement/public_html/MyCalendar.php on line 19
Any ideas?