Questo non ti è sufficiente?
Codice PHP:
function foo($query)
{
echo 
$query;