foreach ($photos as $photo){ $this->view->setVar("addGenre",$photo->genre); $addGenre .= $photo->genre."/"; // 1. here occur some problem $i++; }
upper line $addGenre .= <== I want to use this method. but error
Undefined variable addGenre
$this->view->setVar("addGenre",$photo->genre);
or
$this->view->setVar("genre",$addGenre);
used it
but ...no way..
please help me... thanks