[eluser]developer10[/eluser]
[quote author="Rolly1971" date="1285632454"]in your foreach loop you set $data = $broj on every iteration. on the next iteration since you do not do anything with $broj the data is lost even though you set $data to = $broj every loop and once your loop is done any information in the $data variable is lost when you set it to:
$data = $projeckti;
after the loop is done.
try something like this:
Code:
$i = count($projekti);
for ($j = 0; $j < $i; $j++)
{
$projekti[$j]['count'] = $this->db->count_all_results('job_ponude', array('pro_id' => $projekti[$j]['pro_id']));
}
return $projekti;
[/quote]
well u tried that but nothing happens nor changes
look, i need to have it like this:
Project id: [value]
Project name: [value]
Bid Count: [
number] this is the number i'm trying to get
Project ends: [value]
I'm able to get all the values by $projekti = $query->result_array();
but i need that count to display number of bids for each project.
Now i dont understand how should i modify the view file in order to utilise the code you gave to me (maybe it does work but, i didnt change my view)