To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
Location: Rapid Offensive Unit "Foreign Object Damage"
Posts: 19,122
What the error message says. $this is a special variable that you can't just assign values to. Call it something else.
Also, since you're a Newbie, see the Guidelines in the Newbies' Forum.
__________________
On two occasions I have been asked [by Members of Parliament], "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
function cutstring($mystring,$len){
// $mystring la xau can cat
$count=1;
$a="";
while ($count <=$len){
$pos = strpos ($mystring, " ");
$a=$a.substr($mystring,0,$pos+1);
$mystring=substr($mystring,($pos+1),strlen($mystring)-$pos);
$count++;
}
return $a;
}
function test($ngay)
{ $a='';
if ($ngay>2)
$a = $ngay.''.T1_ngay.'/ '.($ngay-1).' '.T1_night;
else if ($ngay==2)
$a= $ngay.''.T1_ngay.'/ '.($ngay-1).' '.T_night;
else
$a= '0'.T_ngay;
return $a;
}
function Processdate($strdate)
{
$year = substr($strdate,0,4);
$month = substr($strdate,4,2);
$day = substr($strdate,6,2);
if ($strdate == '') return '';
else
return $day.'/'.$month.'/'.$year;
}
?>
Error line 34
you are using $this as genera variable for assign value. that's why u are getting error message.
you can not use this as simple variable it is a key word which is used for specific purpous.
you are new in php you should read php manual in which there are all convention of variable declaring are defined.