Advertisement
Guest User

Untitled

a guest
Sep 25th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. $mt = $conn->query("SELECT entry_type FROM myTable WHERE entry_type = 'pagina' GROUP BY entry_type");
  2. $res = $mt->fetchAll(PDO::FETCH_ASSOC);
  3. print_r($res); /////////Resultado 1
  4.  
  5. foreach ($res as $FB["entry_type"]) {
  6. print_r($res); /////////Resultado 2
  7. print_r($FB); /////////Resultado 3
  8. if ($FB["entry_type"] == 'pagina') {
  9. print_r($FB);; /////////Resultado 4
  10. echo '<meta property="og:type" content="website">';
  11. } else {
  12. print_r($res); /////////Resultado 5
  13. echo '<meta property="og:type" content="article">';
  14. echo '<meta property="article:author" content="">';
  15. echo '<meta property="article:publisher" content="">';
  16. echo '<meta property="article:published_time" content="">';
  17. echo '<meta property="article:modified_time" content="">';
  18. }
  19. }
  20.  
  21. Resultado 1: Array ( [0] => Array ( [entry_type] => pagina ) )
  22.  
  23. Resultado 2: Array ( [0] => Array ( [entry_type] => pagina ) )
  24.  
  25. Resultado 3: Array ( [entry_type] => Array ( [entry_type] => pagina ) )
  26.  
  27. Resultado 4: Não mostrou nada na tela.
  28.  
  29. Resultado 5: Array ( [entry_type] => Array ( [entry_type] => pagina ) )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement