View Single Post
Old 01-06-2012, 03:21 AM   #1 (permalink)
rawprogrammer
The Visitor
Newcomer 
 
Join Date: Dec 2011
Posts: 1
Thanks: 0
rawprogrammer is on a distinguished road
Unhappy print_r noting happen with my class

i build new class to loop field html but when i print_r it nothing "FeildHTML Object ( )"
here my code

class FeildHTML
{
public function setFeildCheck ($field,$fieldval,$unsetbutton)
{
$field = array($field);
$fieldval = array($fieldval);
$label = array_combine($field,$fieldval);
unset($_POST [$unsetbutton]);
foreach($_POST as $k=>$v)
{
$$key = $v;
echo $label[$k]."=$v<br />";
}
}

}
$a = new FeildHTML();
$a->setFeildCheck('a','b','c');
print_r($a);
?>
rawprogrammer is offline  
Reply With Quote