[thelist] PHP & CSS (Two Part Question)
Steve Lewis
slewis at macrovista.net
Wed May 1 20:32:01 CDT 2002
Burhan Khalid wrote:
> Two questions, isn't that list($value, $key) supposed to be list($key,
> $value), or does
> it not matter?
You are correct, it should be ($key, $value)
> How would I get the numerical index from that list thing?
You would not; if you didn't need the numeric index this could have worked.
> Wouldn't that just print a bunch of links from my array? The only way
> I can
> see that happening is if I stick a counter in there, which iterates on
> every instance of the loop. Which makes me think that I would have to
> use a
> break in there somewhere, with an if(), so that it doesn't just print the
> whole trail. What do you think?
That would work... but array_keys() is probably more "elegant." The
language gives you tools, use them instead of cooking your own.
<troll>Like the infamous GOTO, the use of for-loops and variables named
'counter' should be depreciated when the language provides higher-level
support for the task.</troll>
> Hmm...looks promising, I'm going to give it a shot.
Good Luck.
--Steve Lewis
More information about the thelist
mailing list