12-17-2008, 09:24 AM
|
#1 (permalink)
|
|
The Contributor
Join Date: Sep 2008
Location: Miami
Posts: 39
Thanks: 7
|
From String to function
Code:
<?=$member->contact('email'); ?>
Code:
<?=$member->contact('msn'); ?>
When I use the code above to get information for the user profile.
it goes to this function
Code:
class member
{
public function user($variable)
{
return $variable;
}
public function contact($variable)
{
echo $member['$variable'];
}
}
$member = new member();
Problem is that its not working as I planned.
Code:
Notice: Undefined variable: member in "path"
any ideas as to what may be wrong here?
|
|
|