Ive got some extra credit for my php class and I'm allowed to be asking for help on this.
What I have is an array like this:
$b = array(10, 15, 2, 30, 6);
Next, I have a form that will be "simulating taking money," thus giving me this value:
$money = $_POST['input_m'];
What I'm looking for is a solution for the code to go through each value and return how many of the current $b array value.
For example, I can type "15" in the money field, the program will return:
(0, 1, 7, 15, 3), and all of the other possible solutions.