$results = $wpdb->get_results('SELECT COUNT(*) AS "total" FROM wp_realty_listingsimages'); echo $total; echo total; print "<pre>"; print_r($results); print "</pre>" total Array ( [0] => stdClass Object ( [total] => 16876 ) ) i want my answer to be like = 234 not all the other crap Like this My total for this table is $total. and it will print My total for this table is 234. do not want to see all that array stuff printed..