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

iphone - Three second countdown in cocos2d -

hyperlink - how to do url routing in php -

c - Avoiding Extra Malloc in Linked List (node->next = NULL) -