Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2017
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. <?php
  2. //Conexão com o Banco de Dados
  3. require('config.php');
  4.  
  5. // Seleção de Banco de Dados para consulta
  6. $referencia = $_GET["imovel"];
  7. $dados_imovel = mysql_fetch_array(mysql_query("SELECT * FROM tbl_imoveis WHERE id = '$referencia'"));
  8. $caracteristicas = $dados_imovel["im_caracteristicas"];
  9. ?>
  10. <?
  11. $im_carac = "$caracteristicas";
  12. $op = explode("|",$im_carac);
  13. $total = count($op);
  14. $colunas = "4";
  15. if ($total>0) {
  16. for ($i = 0; $i < $total; $i++) {
  17. if (($i%$colunas)==0) {
  18. $colspan = $colunas+$colunas+$colunas;
  19. ?>
  20. <? }?>
  21. <?
  22. $opc = mysql_query("SELECT * FROM tbl_caracteristicas WHERE id='$op[$i]'");
  23. $dados = mysql_fetch_array($opc);
  24. echo "<div class=\"one-fourth column-last\">
  25. <ul class=\"check\">
  26. <li>$dados[caracteristica]</li>
  27. </ul>
  28. </div>";
  29. }
  30. ?>
  31. <? }?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement