> The best option is to sort it in the query.
yes, of course!, that makes sense.. I feel silly not thinking of that in the
first place.
Now I do not need to sort the array with PHP.. but glad you mentioned
array_multisort() as well.. so I could make a mental note of that function.
Thanks to S
On 03/10/2012 07:01 PM, Shawn McKenzie wrote:
> foreach ($query->result() as $row) {
>> $arr_cTree[$row->cID] = array($row->cPcID, $row->cL, $row->cName,
>> $row->cSeg, $row->cSort);
>> }
Actually, you may construct your array as follows to make sorting with
ksort():
foreach ($query->result
On 03/10/2012 06:42 PM, Govinda wrote:
> Hi Everyone
>
> I am newbie enough with the terminology around PHP arrays that I am slow to
> wrap my head around what I know is in the docs (what i am reading)... but
> just can't identify yet.
>
> I think it will be faster if someone can translate for
3 matches
Mail list logo