class user{
var $property = array();
function setProperty($p){
$this->$property[$p] = $p;
}
function getProperty($get){
return $this->$property[$get];
}
}
if i do this...
$user->setProperty("One");
$user->setProperty("Two");
$user->setProperty("Three");
echo $user->getProperty("One");
will always print "Three"... it always prints the last value i assigned even though they should be different...
whats up? this is php 4