I'm trying to create PHP code to output the results of a MySQL query to several sequential html files. For example from a table with fields including "ID" and "Title" I would like to select rows where "ID" =x and output the first 20 results to Title1.html, the next 20 to Title2.html etc for all results. Ideally the script should be able to create a new Titlex.html page as neccessary. Can anyone suggest how this should be done or point to any resources which cover this. My knowledge of PHP / MySQL is pretty limited.
One idea would be to include a counter within your while ($row = mysql_fetch_array($result)) to move through sequential fopened html files in which to dump your content....