Preview:
<?php

$stmt->execute(array('id' => $id));

# Pega um array contendo todos os resultados
$result = $stmt->fetchAll();

# Se um ou mais resultados forem retornados...
if ( count($result) ) {
    foreach($result as $row) {
        print_r($row);
    }
} else {
    echo "Nenhum resultado retornado.";
}

 ?>
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter