これは私に最後の値だけを与え、私のdbのすべての値を与えないのはなぜですか? $array['id'] = $client->getId();
と$array['value'] = $client->getName();
とforeach PHPで連想配列を埋めてください
$em = $this->getDoctrine()->getManager();
$repo = $em->getRepository('ErpBundle:Sponsor');
$clients = $repo->findAll();
$array = array();
foreach ($clients as $key =>$client){
$array['id'] = $client->getId();
$array['value'] = $client->getName();
}
return $array