In the first place, you should not use echo statements in snippets. You should gather the output into a variable, such as $output, then finally return the $output.
In the second place, it's a good idea to use single quotes for the PHP, and double quotes for the HTML so that you don't get them mixed up.
And you can't use MODx tags inside snippet code; that's PHP and PHP doesn't understand snippet code.
$output .= $qparastart . '<a href="' . $modx->makeUrl(71) . '#' . $faq[$row][$IDindex] .'">'.$faq[$row][$qindex].'</a></p>');
Personally, I prefer to use Jot as the FAQ engine, with the "subject" being the question and the "comment" being the answer, and use an output tpl to create the HTML structure for the output. A bit of Jquery can turn a number of different structures into a very nice FAQ accordion. I seem to find a different one to like every time I need to design such a thing.
[ed. note: sottwell last edited this post 14 years, 2 months ago.]