I have the next php code class:
<?php
class test {
var $one;
var $two;
function test (){
$this->$one = "test 1";
$this->$two = "test 2";
}
function getVariables(){
echo $this->$one . "<br>";
echo $this->$two . "<br>";
}
}
?>
and i create an object in a php page like this:
<?php
include ("classtest.php");
$object = new test();
$object->getVariables();
?>
but the output of the navigator is:
test 2
test 2
when the right output must be:
test 1
test 2
why success it?
thanks for all, and sorry for my english.