pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ludwig Lim <lud_nowhere_man@yahoo.com>
To: PostgreSQL-PHP Mailing List <pgsql-php@postgresql.org>
Subject: Some Questions
Date: Thu, 12 Jun 2003 05:05:02 -0700 (PDT)
Message-ID: <20030612120502.63422.qmail@web80507.mail.yahoo.com> (raw)

Hi:

   I have a question on calling a method in PHP.

suppose I have file class1.php which contains class1
<?
  class class1{
      var $a1;

      function class1()
      {
        $this->a1 = "hello";
      }

      function t1()
      {
          return $this->a1;
      } 
  }
?>
in test.php I have the ff:
<?
    include("class1.php");
    $obj = new class1();
    $a = "test";

    die("this is $a message=$obj->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



view thread (2+ messages)  latest in thread

Message-ID: <20030612120502.63422.qmail@web80507.mail.yahoo.com>
Permalink:  ../20030612120502.63422.qmail@web80507.mail.yahoo.com/
Also on:    postgresql.org/message-id/20030612120502.63422.qmail@web80507.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: lud_nowhere_man@yahoo.com
  Subject: Re: Some Questions
  In-Reply-To: <20030612120502.63422.qmail@web80507.mail.yahoo.com>
  References: <20030612120502.63422.qmail@web80507.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox