I'm not clear about what you mean by "echo the output of a mySQL query."
If you want to see what PHP did to your string before it was passed to MySQL, change
mysql_query("DELETE FROM table WHERE id = '$id'");
to
echo("DELETE FROM table WHERE id = '$id'");
If you want MySQL to count the records that match your WHERE clause, change DELETE to SELECT COUNT(*) AS count
... and then run the query and echo the value of count.
(Incidentally, if id is an integer, as IDs should be, don't quote it.)
In certain SELECT cases it might be useful to have MySQL EXPLAIN the query; look up EXPLAIN in the MySQL manual.