Any PHP users here also know TCL?
soazine@pop.erols.com
soazine at pop.mail.rcn.net
Sat Jun 7 14:01:09 EDT 2003
I could use a hand with a TCL-related problem I'm having on my site!
I have a list as follows:
id 1 pollID 1 question {How are you?} answerID 1 answer {I'm fine, thanx}
id 2 pollID 1 question {How are you?} answerID 2 answer {OK} id 3 pollID 1
question {How are you?} answerID 3 answer {Leave me alone, life sucks!} id
4 pollID 2 question {Do you think there should be a TCL certification exam
in Brainbench?} answerID 1 answer {Yes} id 5 pollID 2 question {Do you
think there should be a TCL certification exam in Brainbench?} answerID 2
answer {No}
I am going to edit this list by doing a change to a part of the
question/answer set in, say, pollID 2. I want to them go to the first
instance of "pollID 2" and not have to loop as this list can become
extremely large (on my live site the XML file that this list is derived
from has an id range that goes to 1000!).
How then do I use [lsearch] based on this pattern? "pollID $pollID"?
[lsearch] fails every combination I tried (returns -1), while [string
first] finds it, however, the index is completely wrong for the list
functions.
Advice?
Thanx
Phil
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .
More information about the talk
mailing list