Hi,
Im gathering a selection of pieces of information and i want to look at each 'selection' in turn...
for example:
Im gathering sets like below:
Url
NameA
AmountA
NameB
AmountB
NameB
AmountB
I could possibly gather up to 5 or 6 different sets.
In each set i want to compare amounts from differnt sets to see which combination adds up to 10, if they do i want to retain the information about which amount comes from which set.
See the example below:
Paul
5
Mark
8
Luke
2
Martin
6
Jack
3
Frank
9
Matt
7
Graham
2
John
2
An example answer would be:
Paul
5
Jack
3
John
2
Ive tried code but i cant sort out the arrays. The code i have doesnt do much.
I am looping through extractions from a database and adding them to an array using the push function.
I noticed that they dont stay in the array in the same order i put them in, this leaves me knackered!!
Although when i am using the push function i am giving each a name:
push(@myArray,
Url => NameA => Paul
AmountA => 5
NameB => mark
AmountB => 8
NameB => Luke
AmountB =>2
)
I would like if possible to reference them like
$myArray[0] or something though im not sure if...o read this much text!!!) Kind regards Nash
Im gathering a selection of pieces of information and i want to look at each 'selection' in turn...
for example:
Im gathering sets like below:
Url
NameA
AmountA
NameB
AmountB
NameB
AmountB
I could possibly gather up to 5 or 6 different sets.
In each set i want to compare amounts from differnt sets to see which combination adds up to 10, if they do i want to retain the information about which amount comes from which set.
See the example below:
Paul
5
Mark
8
Luke
2
Martin
6
Jack
3
Frank
9
Matt
7
Graham
2
John
2
An example answer would be:
Paul
5
Jack
3
John
2
Ive tried code but i cant sort out the arrays. The code i have doesnt do much.
I am looping through extractions from a database and adding them to an array using the push function.
I noticed that they dont stay in the array in the same order i put them in, this leaves me knackered!!
Although when i am using the push function i am giving each a name:
push(@myArray,
Url => NameA => Paul
AmountA => 5
NameB => mark
AmountB => 8
NameB => Luke
AmountB =>2
)
I would like if possible to reference them like
$myArray[0] or something though im not sure if...o read this much text!!!) Kind regards Nash