//Object To Array
function object2Array($d)
{
if (is_object($d))
{
$d = get_object_vars($d);
}
if (is_array($d))
{
return array_map(__FUNCTION__, $d);
}
else
{
return $d;
}
}
// After This
$attachments_id=$value -> attachments;
$attachments_array = object2Array($attachments_id);
foreach($attachments_array as $attachments_data)
{
echo "=====================Start Attachments Data =================================<br/>";
echo "ID : ".$attachments_data['id']."<br/>";
echo "uploaded_name :".$attachments_data['uploaded_name']."<br/>";
echo "uploaded_extension : ".$attachments_data['uploaded_extension']."<br/>";
echo "mime_type : ".$attachments_data['mime_type']."<br/>";
echo "file_size :".$attachments_data['file_size']."<br/>";
echo "url : ".$attachments_data['url']."<br/>";
echo "=====================End Attachments Data =================================<br/>";
}
// Array To Object
function array2Object($d)
{
if (is_array($d))
{
return (object) array_map(__FUNCTION__, $d);
}
else
{
return $d;
}
}
$object = array2Object($array);
print_r($object);
echo "\r\n";
Click Here
function object2Array($d)
{
if (is_object($d))
{
$d = get_object_vars($d);
}
if (is_array($d))
{
return array_map(__FUNCTION__, $d);
}
else
{
return $d;
}
}
// After This
$attachments_id=$value -> attachments;
$attachments_array = object2Array($attachments_id);
foreach($attachments_array as $attachments_data)
{
echo "=====================Start Attachments Data =================================<br/>";
echo "ID : ".$attachments_data['id']."<br/>";
echo "uploaded_name :".$attachments_data['uploaded_name']."<br/>";
echo "uploaded_extension : ".$attachments_data['uploaded_extension']."<br/>";
echo "mime_type : ".$attachments_data['mime_type']."<br/>";
echo "file_size :".$attachments_data['file_size']."<br/>";
echo "url : ".$attachments_data['url']."<br/>";
echo "=====================End Attachments Data =================================<br/>";
}
// Array To Object
function array2Object($d)
{
if (is_array($d))
{
return (object) array_map(__FUNCTION__, $d);
}
else
{
return $d;
}
}
$object = array2Object($array);
print_r($object);
echo "\r\n";
Click Here