No one?
> I had an $array, with a list of authors and an entry number. Below is the code I > used. Now I > have compiled it all into a table. I don't know how to re-code these lines: > > foreach (array_count_values ($authors) as $author=>$count) > foreach ($author_list[$author] as $ausid) > > -----------new code----------- > $myconnection = mysql_connect($server,$user,$pass); > mysql_select_db($db,$myconnection); > > $news = mysql_query("select ccl_id,AUS from $table ORDER by AUS"); > > while ($mydata = mysql_fetch_object($news)) > { > ?? foreach (array_count_values ($authors) as $author=>$count) > { > ?? foreach ($author_list[$author] as $ausid) > { > } > } > } > > ------ My old code --------- > foreach (array_count_values ($authors) as $author=>$count) > { > echo "<tr>"; > echo "<th>$author</th>"; > echo "<th>".$count." records found/trouvés)</th>"; > echo"</tr>\n"; > echo "<tr bgcolor=\"#F5F5F5\"><td> </td>"; > echo "<td align=\"left\">"; > $temp = ""; > foreach ($author_list[$author] as $ausid) > { > $temp .= "$ausid, "; > } > $temp = substr("$temp", 0, -2);#delete ", " > echo "$temp</td>"; > > echo "</tr>\n"; > } > > -- > John Taylor-Johnston > ----------------------------------------------------------------------------- > °v° Bibliography of Comparative Studies in Canadian, Québec and Foreign > Literatures > /(_)\ Université de Sherbrooke > ^ ^ http://compcanlit.ca/ -- John Taylor-Johnston ----------------------------------------------------------------------------- "If it's not open-source, it's Murphy's Law." ' ' ' Collège de Sherbrooke: ô¿ô http://www.collegesherbrooke.qc.ca/languesmodernes/ - 819-569-2064 °v° Bibliography of Comparative Studies in Canadian, Québec and Foreign Literatures /(_)\ Université de Sherbrooke ^ ^ http://compcanlit.ca/ T: 819.569.2064 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php