Uhh, I'm already that far. Maybe I didn't explain it precisely. I would like to display the results in the HTML file using echo. Something like

for every result
{
printf( "<td>data1</td><td>data2</td>");
}

It's just that I'm not sure with the code.