I was just wondering how to code betting odds (such as 10/1, 7/5, 11/10, etc.) into php. I want to make a betting page on my website but not too sure how to code the betting odds that gives the users their winning based on the odds they betted on. Thanks in advance
10/1 is 11 in decimal so you have an decimal odds , you also need to ask how much money a visitor want to bet and rest is mathematics.
Given a know odd ratio x:1. User bets $z. Note than w:y can be written as x:1, by setting x=w/y (So 7:5 is the same as (7/5):1 ) User loses: user loses z User wins: user wins z*x This is just some basic math, did you have a specific question?