how to convert array data to work with it in this case? especially in wordpress. when i print the results i get stdClass Object.
Array
(
[0] => stdClass Object
(
[posts_id] => 336
[value] => 8
[count(*)] => 2
)
[1] => stdClass Object
(
[posts_id] => 329
[value] => 2
[count(*)] => 1
)
[2] => stdClass Object
(
[posts_id] => 327
[value] => 3
[count(*)] => 1
)
[3] => stdClass Object
(
[posts_id] => 338
[value] => 1
[count(*)] => 1
)
)
and this is my query
<?php global $wpdb;
$test = $wpdb->get_results('select
posts_id,
value,
count(*)
From
wp_mrp_rating_item_entry_value
group by
posts_id,
value
order by
count(*) desc');
echo '<pre>';
print_r($test);
echo '</pre>';
How can i get the data out of this array to save into another database table? Or how can i at least save the single values into variables for every id? I tried allot but i have no idea yet so i hope someone is knowing it better than me? thanks for any help.