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/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php