fork download
  1. <?php
  2. public function add_albums($band_id,$albums)
  3. {
  4. for ($i=0 ; $i<count($albums); $i++)
  5. {
  6. $album_id=$albums[$i];
  7. $string="INSERT INTO `bands_albums` (`band_id`,`album_id`) VALUES (:band_id,:album_id)";
  8. $query=$this->db->prepare($string);
  9. $query->bindValue(':band_id', $band_id, PDO::PARAM_INT);
  10. $query->bindValue(':album_id', $album_id, PDO::PARAM_INT);
  11. if(!$query->execute())
  12. return false;
  13. }
  14. return true;
  15.  
  16. }
  17. ?>
Runtime error #stdin #stdout #stderr 0.01s 20552KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Parse error:  syntax error, unexpected 'public' (T_PUBLIC) in /home/y63lKR/prog.php on line 2