array advice pleeease :)
Posted: Mon Jan 28, 2008 6:54 am
simplified my post...
when looping thru my array i get:
117=>Yes
117=>true
118=>Yes
118=>true
what i want to achieve is:
if both lines '117 is yes' and '117 is true' are present, i want to enter a timestamp into the database where id=117
repeating the code for each number that crops up, eg: 118, 119, 120 etc
can i compare or look for parts of an array somehow?
if the opposite values get passed thru the array would read:
117=>No
118=>No
i guess if a val is yes or no then add the id to list A, if the val is true then add the id to list B. so now i have:
list A - list B
117 - 117
118 - 118
119 - 120
120
how do i compare these two lists to give me a final list of ids that appear in both A and B ??!

when looping thru my array i get:
117=>Yes
117=>true
118=>Yes
118=>true
what i want to achieve is:
if both lines '117 is yes' and '117 is true' are present, i want to enter a timestamp into the database where id=117
repeating the code for each number that crops up, eg: 118, 119, 120 etc
can i compare or look for parts of an array somehow?
if the opposite values get passed thru the array would read:
117=>No
118=>No
i guess if a val is yes or no then add the id to list A, if the val is true then add the id to list B. so now i have:
list A - list B
117 - 117
118 - 118
119 - 120
120
how do i compare these two lists to give me a final list of ids that appear in both A and B ??!