I am trying to sort results (article titles) alphabetically, but some of the titles have html tags (<i> or <em>) and they are showing at the top of the list.
Here is my code:
$q3 = "select id, title, date, article_url from publications where id in ($list) order by title";
$result3 = mysql_query($q3,$mysql_link);
while($row = mysql_fetch_array($result3)) {
$pid = $row[id];
$title = $row[title];
$date = $row[alt_date1];
$article_url = $row[article_url];
print "$title, $date, $article_url<br>";
}
$q4 = "select authors.* from j_pub_authors left join authors on authors.id = j_pub_authors.author_id where j_pub_authors.pub_id = $pid";
$result4 = mysql_query($q4,$mysql_link);
while($row = mysql_fetch_array($result4)) {
$first_name = $row[first_name];
$last_name = $row[last_name];
print "$first_name $last_name, ";
}
Thanks for any tips.