// callback column public function _callback_test($value, $row) { // array with the info $test= $this->Misc->getDen($row->id,'aaaa','bbbb','1'); foreach ($test as $key => $value) { return $value->xxxx; } }
⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠
Posted 31 July 2014 - 06:19 AM
// callback column public function _callback_test($value, $row) { // array with the info $test= $this->Misc->getDen($row->id,'aaaa','bbbb','1'); foreach ($test as $key => $value) { return $value->xxxx; } }
Posted 31 July 2014 - 07:27 AM
well my friend .. read the statement you set with ...
u are returning the value..
when u use return.. thats the end of the functions execution point.. whatever value u return.. it just passes back the control to the parent (the 1 who called the function).
In this case.. i rather suggest u to collect all the output into a string (append each output to be returned .).. all combined together is what u return @the end of the for loop
OR collect all the output to be returned into an array and then implode the same and generate a string and then return the combined string.
Hope this solves your problem / trouble..
Happy GCing :)
Posted 31 July 2014 - 11:39 AM
Hm ... can you give me a example when you have time ?
Posted 31 July 2014 - 14:06 PM
Damn that was easy .. if someone gets into this problem to you can use implode :
$test1=implode($test,"<br>"); return $test1;
Thanks a loot
Amit Shah