fork download
  1. <?php
  2.  
  3. $first = "%$first%";
  4. $stmt = $pdo->prepare("SELECT id FROM dbCountries WHERE name LIKE ? OR alias LIKE ?");
  5. foreach ($first as $id => $x)
  6. {
  7. $stmt->execute([$x,$x]);
  8. }
  9. foreach ($citiesId as $desk){
  10. while ($row = $stmt->fetch(PDO::FETCH_LAZY)) {
  11. foreach ($row as $s=>$a){
  12. echo "$a\n";
  13. }
  14. }
  15. }
Runtime error #stdin #stdout #stderr 0.03s 23576KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Notice:  Undefined variable: first in /home/BSs2gZ/prog.php on line 3
PHP Notice:  Undefined variable: pdo in /home/BSs2gZ/prog.php on line 4
PHP Fatal error:  Uncaught Error: Call to a member function prepare() on null in /home/BSs2gZ/prog.php:4
Stack trace:
#0 {main}
  thrown in /home/BSs2gZ/prog.php on line 4