Re: ars_GetListEntry
Brought to you by:
jeffmurphy
|
From: Vern H. <ve...@ha...> - 1996-12-27 02:02:29
|
On Thu, 26 Dec 1996, Miriam Yaged wrote:
>
> %entries = ars_GetListEntry($ctrl, $schema, $qual, 0, $counter, 2);
>
> But when I print out the results the entries aren't in sorted order -
> why would that occur???
That's actually a "perl-ism". In perl, any of the functions that get
the values out of associated arrays return them in no particular order.
(That's documented.)
So, instead of an associative array (%entries) use an ordinary array
(@entries) then use a for loop to step through it.
Something like:
@entries = ars_GetListEntry($ctrl, $schema, $qual, 0, $counter, 2);
for ($i=$[; $i<=$#entries; $i+=2)
{
$entryid = $entries[$i];
$shortdescription = $entries[$i+1];
}
You get the point.
Cheers,
Vern
_ ____________ _ __
| | / / ____/ __ \ / | / / Vern Hart
| | / / __/ / /_/ // |/ / http://www.ip.com ve...@ip...
| |/ / /___/ __, // /| / http://www.vern.com ve...@ha...
|___/_____/_/ |_/_/ |_/ http://www.hungry.com ve...@hu...
|