yup
2005-12-17, Nathan Walp
require('template.inc.php'); require_once('faq-functions.inc.php'); <h1>Frequently
Asked
Questions
</h1> <p><i>Frequently
asked
questions
specific
to
Windows
have
their
own
<a href="/win32">FAQ
</a>.
</i></p> /* The Q&A begins here */ $faq = file("./faq.txt"); $faq_lines = count($faq); /* Loop through once to get all the questions. */ for ($i = 0; $i < $faq_lines; $i++) if ($line == "" || $line == "\n" || substr($line, 0,3) == "A:\t") elseif (substr($line, 0, 3) == "Q:\t") $question = substr($line, 3); $question = preg_replace( "/(<\/?(br|code|pre|div)( ?\/)?>|[\r\n\t])/", " ", $question); print " <li><a href=\"#q" . $qa . "\">"; elseif (substr($line, 0, 9) == "!SECTION\t") print "<b>" . trim(substr($line, 9)) . "</b>\n"; elseif (substr($line, 0, 9) == "!COMMENT\t") "/(<\/?(br|code|pre|div)( ?\/)?>|[\r\n\t])/", " ", $line); /* Now we'll loop through again to print out the questions and answers. */ for ($i = 0; $i < $faq_lines; $i++) if (substr($line, 0, 3) == "Q:\t") elseif (substr($line, 0, 3) == "A:\t") elseif (substr($line, 0, 9) == "!SECTION\t") $name = trim(substr($line, 9)); print "<a name=\"" . build_section_name($name) . "\"></a>\n"; print "<dl class=\"faq\">\n"; elseif (substr($line, 0, 8) == "!ANCHOR\t") $anchor = trim(substr($line, 8)); elseif (substr($line, 0, 9) == "!COMMENT\t") elseif ($in_question || $in_answer)