Posted by bill on 01/04/07 14:41
Hendri Kurniawan wrote:
> Another way to do it VIA array
>
> <?php
> $vals = array();
> while ($temp = fetch_row_from_db()) $vals[$temp[0]] = $temp;
> var_dump($vals);
> ?>
>
> This way, you are sure to get the last row of every value.
>
> Hendri Kurniawan
>
Hendri,
Would you please take pity on a PHP newbie and explain your code.
It is elegant and dense I can't quite make sense of it.
Shouldn't there be a bracket after the while statement ?\
bill
Navigation:
[Reply to this message]
|