I have a variable like this
$profile = $adapter->getProfile();
Now i'm using it like this
$profile->profileurl
$profile->websiteurl
$profile->etc
Now i want to use it in a foreach loop
So i created an array like this
$data = array('profileurl','websiteurl','etc');
foreach ($data as $d ) {
${$d} = ${'profile->'.$d};
}
When I use var_dump(${$d}) I see only NULL instead of values.
Whats wrong?
var_dump($profileurl, $websiteurl, $etc)give you?