Advertisement
yesamarcos

Percorrendo alfabeto, selecionando registros ...

Jul 25th, 2017
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.24 KB | None | 0 0
  1. <?php
  2.  
  3. $alfabeto = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"];
  4.  
  5. foreach($alfabeto as $letra){
  6.     $sql = 'SELECT * FROM animes WHERE titulo LIKE "%$letra"';
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement