symfony - How to get the id of all the materials? -


help me

public function indexaction()  {   $tpos = $this->getdoctrine()->getrepository('testbundle:materials')->findall();  foreach($tposs $tpos) {      $posts['id']; }   echo $midcount; 

how you?

notice: undefined index: id

$materials = $this->getdoctrine()->getrepository('testbundle:materials')->findall(); $materialids = array(); foreach ($materials $material) {     $materialids[] = $material->getid(); } 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -