Results 1 to 2 of 2

Thread: PHP 4: Class problem

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    Resolved PHP 4: Class problem

    Anyone knows why I am getting 'eeek' with this code
    Code:
    class test {
      var $a;
      var $b;
      
      function x() {
        $this->a = "hello";
      }
      
      function y() {
        $this->b = "world";
      }
      
      function z() {
        echo $this->b;
      }
    }
    
    $t = new test();
    $t->z() or die('eeek');
    ?>
    Thanks in advance.
    Last edited by nebulom; May 22nd, 2007 at 10:09 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width