I have a listing of teachers on a website, and it is being printed in chronological order, and I wanted to put it alphabetically.
Follow the code below:
<div class="row">
<ul class="team-list sort-destination appear-animation animated fadeInUp appear-animation-visible" data-appear-animation="fadeInUp" data-appear-animation-delay="50" data-sort-id="team">
<? while ($p = $prof->fetch(PDO::FETCH_ASSOC)){?>
<li class="col-md-3 col-sm-6 col-xs-12 isotope-item <?=str_replace(' ', '-', tirarAcentos($p['materia']));?>">
<div class="team-item thumbnail">
<p class="thumb-info team">
<img class="img-responsive" alt="" src="http://editoraopirus.com.br/uploads/<?=$p['unidade'];?>/professores/<?=$p['url_foto'];?>"><spanclass="thumb-info-title">
<span class="thumb-info-inner"><?=$p['nome'];?></span>
<span class="thumb-info-type"><?=$p['materia'];?></span>
</span>
</p>
</div>
</li>
<? }?>
</ul>
</div>