[almost complete amateur here] i made an odds calcs in javascript then put into php on belief it is faster in this format you are welcome to browse the code for ideas it is up at www.dougs.cc however i dont think you can access the code part, so have taken a copy and put it at www.dougs.cc/code.txt as i say, i am happy for people to use the code, however if you use the majority of it, please donate a link or make mention, ta! (just something i found humerous, i asked similar of a guy who asked me to provide the code just to "look over". He said he had no intention to use it, but a day later this site appeared - notice any similarities??!!!) anyway, as for the gist - it forms an array of 7 cards, starting with the player's cards and the cards known and searches for (in roughly this order) royal flush, 4oak, flush, str8, 3of a kind, fh pair, 2pair the last four might appear wrong order, as most in descending order of strenth, hwover have to look for 3 of a kind before fh, it assigns a unique number based on hand strength, (for flush this is just one number, for others, it is based on the strength of hand in that category, so for a two pair, the number will uniquely determine the two difrferent pairs held) when it comes to comparring 7 card arrays, it then can compare the number - and if necessary ask to see kicker cards, for when the numbers match my friend mused an alternative method, of finding hand strength by computing all possible 5 card hands from the 7 given cards dont thnk this has benefits, as 7 choose 2 for each array = 21 possibilities, his method then created a unique 6 long vector however - hand strenth, top card, second card, third card 4th, 5th which made it easier comparing hands, as did not have to additionally request kickers though on other hand, my method might be speedier in only requestion kickers when needed anyway, will follow this thread with interest, as ever since i saw a 4 line sudoku solver, ive realsed how much you can improve your code.... regards