Jump to content

olegk

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

olegk's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. because you are trying to insert identical IDs into the table. I assume ID is the primary key.
  2. [quote author=sanfly link=topic=106006.msg423695#msg423695 date=1156808950] ... should the line in red be: ... [/quote] No, that's the point. If it were $this->$b, I would expect the code to print "AB", but I print out $this-$a twice, and for some reason the second time it turns into "B"
  3. This code prints out "AB", and it should print out "AA". What's wrong with me? PHP 4.4.2 <?php class test {   var $a="";   var $b="";   function testfunc()   {       $this->$a="A";       echo $this->$a;       $this->$b="B";       echo $this->$a;   } } $t=new test; $t->testfunc(); ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.