|
Posted by severin on 01/09/07 10:31
Hi,
I'm trying to format a timestamp in "french" date.
_________________________________________________________________
$jour = Array(
'mon' => 'lundi',
'tue' => 'mardi',
'wen' => 'mercredi',
'thu' => 'jeudi',
'fri' => 'vendredi',
'sat' => 'samedi',
'sun' => 'dimanche'
);
then:
$jour[ date( "d" , mytimestamp )];
returns a french day.
__________________________________________________________________
but i'm trying (begining) to work with classes:
class myformat(){
var $mytime;
function myformat( $atimestamp ){
$this->mytime = $atimestamp;
}
function mydate(){
//********************************
//******** here is the "bug" **************
//******************************************
echo $jour[ date('d',$this->mytime)];
}
}
=> ERROR, $jour is not accessible.
What is the most appropriate syntax( PHP 4)
Thx.
[Back to original message]
|