|
Posted by Rami Elomaa on 05/29/07 19:45
vinnie kirjoitti:
> hi guys, i'm just at the beginning. I apologize. the file still gives
> me back an error:
>
> <<Parse error: syntax error, unexpected T_VARIABLE, expecting
> T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in d:\inetpub\webs
> \giuglianoit\sito\class.php on line 19>>
>
> why? Can someone fix it so i can "study" the working one? Thanks
>
> class somma {
> var $uno=10;
> var $due=15;
> var $tre=15;
> function sum($uno, $due, $tre) {
> $totale = $uno + $due + $tre;
> return($totale);
> }
> function sum_2(){
> $totale = $this->sum($this->uno, $this->due, $this->tre);
> return $totale;
> print("$totale");
> }
Don't see a } here... Where does the class end?
> $somma=new_somma();
> $sum=$somma->(34,40);
Which function are you calling here?
> print("$sum");
> }
Hmm... This } apparently ends the class. It's horribly misplaced, the
class definition ended a few lines ago and you're writing main code
already here...
--
Rami.Elomaa@gmail.com
"Wikipedia on vähän niinq internetin raamattu, kukaan ei pohjimmiltaan
usko siihen ja kukaan ei tiedä mikä pitää paikkansa." -- z00ze
Navigation:
[Reply to this message]
|