First of all, you should look into using WP_Query for this:
http://scribu.net/wordpress/advanced-metadata-queries.html
Secondly, to see the results, just do a var_dump() before the return:
echo '<pre>';
var_dump( $data );
First of all, you should look into using WP_Query for this:
http://scribu.net/wordpress/advanced-metadata-queries.html
Secondly, to see the results, just do a var_dump() before the return:
echo '<pre>';
var_dump( $data );