Some Questions

Поиск
Список
Период
Сортировка
Искать

Some Questions

От:
Ludwig Lim <lud_nowhere_man@yahoo.com>
Дата:
Hi:

   I have a question on calling a method in PHP.

suppose I have file class1.php which contains class1
a1 = "hello";
      }

      function t1()
      {
          return $this->a1;
      } 
  }
?>
in test.php I have the ff:
t1()");
?>

    The message displayed is always:
        this is test message=()
    instead of :
        this is test message=hello

  is there another way of doing it aside from:
  $x = $obj->t1();
  die("this is $a message=$x");


Thanks in advance,
ludwig lim
    

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

Re: Some Questions

От:
"Cornelia Boenigk" <poppcorn@cornelia-boenigk.de>
Дата:
Hi Ludwig

die("this is $a message= ".$obj->t1());

or 

$msg = $obj->t1();
echo("this is $a message $msg");

works.

Regards
Conni

FAQ