Ok how do I get the following fields only using preg_match?
HUH??? I thought you were trying to count co-authors??
By the way, if you ARE intending to count co-authors. You need not even put them in an array since it appears from your output that each co-author is represented by a single record.
//increment a counter...
while ($row = mysql_fetch_array($result)) {
// Display your rows.
$co_authors++;
}
//or even easier, just call this function from the same query result.
$co_authors = mysql_numrows($result);