PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
but sometimes $de_aztec_b will be 0 so the division won't work ( I get an error message saying cannot divide by 0. But for this script to work I would need it to sometimes be 0.
My script is designed for getting the percentage to win on a record based on the results of their record history by getting those 2 variables ( aztec_b is amount played and aztec_a is the amount won ). So what if they are 0-1 as their record. Any ideas?
check to see if the variable on the bottom is 0 before dividing. if it is zero, in most cases, switching it to a 1 will result in the desired result, thus consider what result will be attained when you divide any given number by 1 at that point? if you're sure you want the other number (the normal case) then swithc it to 1, thus resolving the issue
Let's see if we can figure out a better way at this.
This is some more code to give you the big picture.. i also got a few more questions. Forget about the 0 part for now. Note the percentage variable is only setup for $de_aztec and $de_dust in the if statments.
My concerns are right now that the percentages arn't being outputted correctly, it is showing you the record for $de_dust2 being 0-1-50% when I believe it should be 2-2 - 100%:S
I dunt know this is really weird. a link to this is found @ http://www.jcartonline.com/xe/?p=2&r=cal Look near the bottom where it sais "Some Stats"