lonelydragon
Programmer
i am trying to name a variable with a varaible, but met some broblem.
$userArray[] = array('pntr','userLevel',....);
$userInfo[] = array('gdf','dfgdf',....);
for($i=0;$i< count($userInfo);$i++){
$myVal = 'this->'.$userArray[$i];
$$myVal = $userInfo[$i];
}
what i want is : $this->pntr=$userInfo[$i];
anyone can help? thanks
$userArray[] = array('pntr','userLevel',....);
$userInfo[] = array('gdf','dfgdf',....);
for($i=0;$i< count($userInfo);$i++){
$myVal = 'this->'.$userArray[$i];
$$myVal = $userInfo[$i];
}
what i want is : $this->pntr=$userInfo[$i];
anyone can help? thanks