Format the last result of the Select Mysql different

0

I need to put the last result in a different format. like in a mysql table, for example.

<a class="registro">Valor 1</a>
<a class="registro">Valor 2</a>
<a id="ultimoregistro" class="registro">Valor 3</a>

I would like to sort the last record with a different formatting than the rest in PHP, how do I?.

    
asked by anonymous 04.05.2017 / 17:15

1 answer

0

Hello, use CSS and not PHP or MySQL ... Example:

ul a {
  color: blue;
}

ul li:last-child a {
  color: red;
}
<ul>
  <li><a href="#">Link 1</a></li>
  <li><a href="#">Link 2</a></li>
  <li><a href="#">Link 3</a></li>
</ul>
    
05.05.2017 / 14:31