I am trying to fetch specific data from the array of data but not able to get proper output. Please guide me.
Code
echo "<pre>";
$cart = VirtueMartCart::getCart();
$cmpny=$cart->BT;
print_r($cmpny);
$i=0;
foreach($cmpny as $data)
{
if(true)
{
echo $data."
";
}
$i++;
}
exit;
Output What I am Getting
How could i able to fetch only [company] or only any single element.... i had try to access with
$data->company
but not able to fetch.... so please guide me....