Classement par ordre alphabetique PHP

Sasukeman Messages postés 58 Date d'inscription   Statut Membre Dernière intervention   -  
ayanel Messages postés 68 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour, je voudrais afficher mes donnees php en ordre alphabetique comme ici
https://www.otaku-attitude.net/

j'ai fait ceci mais apres je suis paumer -_- merci de m'aidez !

<?PHP
print ('
<center><script type="text/javascript" src="infobulle.js"></script><script type="text/javascript">InitBulle(\'#fff\', \'#3c72f8\', 2);</script><div align="center">
<a style="color: rgb(48, 55, 122);" href="#0">#</a><span style="color: rgb(48, 55, 122);"> - </span><a style="color: rgb(48, 55, 122);" href="#A">A</a><span style="color: rgb(48, 55, 122);"> - </span><a style="color: rgb(48, 55, 122);" href="#B">B</a><span style="color: rgb(48, 55, 122);"> - </span><a style="color: rgb(48, 55, 122);" href="#C">C</a><span style="color: rgb(48, 55, 122);"> - </span><a style="color: rgb(48, 55, 122);" href="#D">D</a><span style="color: rgb(48, 55, 122);"> - </span><a style="color: rgb(48, 55, 122);" href="#E">E</a><span style="color: rgb(48, 55, 122);"> - </span><a style="color: rgb(48, 55, 122);" href="#F">F</a><span style="color: rgb(48, 55, 122);"> - </span><a style="color: rgb(48, 55, 122);" href="#G">G</a><span style="color: rgb(48, 55, 122);"> - </span><a style="color: rgb(48, 55, 122);" href="#H">H</a><span style="color: rgb(48, 55, 122);"> - </span><a style="color: rgb(48, 55, 122);" href="#I">&nbsp;I&nbsp;</a><span style="color: rgb(48, 55, 122);">- </span><a style="color: rgb(48, 55, 122);" href="#J">J</a><span style="color: rgb(48, 55, 122);"> - </span><a style="color: rgb(48, 55, 122);" href="#K">K</a><span style="color: rgb(48, 55, 122);"> - </span><a style="color: rgb(48, 55, 122);" href="#L">L</a><span style="color: rgb(48, 55, 122);"> - </span><a style="color: rgb(48, 55, 122);" href="#M">M</a><span style="color: rgb(48, 55, 122);"> - </span><a style="color: rgb(48, 55, 122);" href="#N">N</a><span style="color: rgb(48, 55, 122);"> - </span><a style="color: rgb(48, 55, 122);" href="#O">O</a><span style="color: rgb(48, 55, 122);"> - </span><a style="color: rgb(48, 55, 122);" href="#P">P</a><span style="color: rgb(48, 55, 122);"> - </span><a style="color: rgb(48, 55, 122);" href="#Q">Q</a><span style="color: rgb(48, 55, 122);"> - </span><a style="color: rgb(48, 55, 122);" href="#R">R</a><span style="color: rgb(48, 55, 122);"> - </span><a style="color: rgb(48, 55, 122);" href="#S">S</a><span style="color: rgb(48, 55, 122);"> - </span><a style="color: rgb(48, 55, 122);" href="#T">T</a><span style="color: rgb(48, 55, 122);"> - </span><a style="color: rgb(48, 55, 122);" href="#U">U</a><span style="color: rgb(48, 55, 122);"> - </span><a style="color: rgb(48, 55, 122);" href="#V">V</a><span style="color: rgb(48, 55, 122);"> - </span><a style="color: rgb(48, 55, 122);" href="#W">W</a><span style="color: rgb(48, 55, 122);"> - </span><a style="color: rgb(48, 55, 122);" href="#X">X</a><span style="color: rgb(48, 55, 122);"> - </span><a style="color: rgb(48, 55, 122);" href="#Y">Y</a><span style="color: rgb(48, 55, 122);"> - </span><a style="color: rgb(48, 55, 122);" href="#Z">Z</a>&nbsp;</div><br /><br />
');


	if ($lettre == '#'){
	$select = mysql_query("SELECT * FROM streaming WHERE titre REGEXP '^[0-9]' ORDER BY titre"); # on selection les catégories
	}else{
	$select = mysql_query("SELECT * FROM streaming WHERE titre REGEXP '^$lettre' ORDER BY titre"); # on selection les catégories
	}

print '<br><p align="center" ><b>Animes en <a name="'.$lettre.'">'.$lettre.'</a></b></p>
';
while($resultat = mysql_fetch_array($select))
{
	$image=$resultat['image'];
	$titre=$resultat['titre'];
	$id=$resultat['id'];
	$genre=$resultat['genre'];
	$auteur=$resultat['auteur'];
	$annee=$resultat['annee'];
	$comm=$resultat['comm'];
		 print $align.'<a href="animes.php?id='.$id.'" style="margin-left: 20px; margin-right: 20px;" name="$lettre"><img src="'.$image.'" style="margin-top: 30px;" alt="'.$titre.'" width="150" border="0" height="150" onmouseOver="AffBulle(\'Fiche technique\', \'<table width=500><tr><td valign=top width=80><b>Nom :</b> '.$titre.'<br /> <b>Genre :</b> '.$genre.' <br /><b> Auteur :</b> '.$auteur.'<br /><b>Ann&amp;eacute;e :</b> '.$annee.'<br /><b>Note :</b> '.$comm.'<br /></td></tr></table>\', 250, \'dl\')" onmouseOut="HideBulle()"   ></a> ';
		  
}

print '</center>';
?>

2 réponses

Sasukeman Messages postés 58 Date d'inscription   Statut Membre Dernière intervention   2
 
up stp !
-1
ayanel Messages postés 68 Date d'inscription   Statut Membre Dernière intervention   2
 
aller visiter pour des manga

https://ayanel2.skyrock.com/
-2