Page 1 of 1

general mathematics question

Posted: Wed Oct 26, 2011 11:46 am
by Obadiah
say I have 3 numbers either in descending or ascending order for poops and hops lets say they are 3, 6, 7 or 9, 8, 4 both sets of numbers represent letters c, d, f. How do I get the number for letters a and b

Re: general mathematics question

Posted: Wed Oct 26, 2011 12:02 pm
by manohoo
Not sure I understand your question... how can 2 different set of numbers represent the same letters?
Anyway, you might want to explore associative arrays. See this example:

Code: Select all

$set1 = array('a'=>1, 'b'=>2, 'c'=>3);
$set2 = array('d'=>7, 'e'=>8, 'f'=>9);

echo $set1['a']; // 1
echo $set2['f']; // 9
echo $set1['b'] + $set2['d']; //9