I have an array that has salary, position, and projected.
$arr[] = array('salary' => $row["salary"], 'position' => $row["position"], 'projected' => $row["projected"])
Position = QB, RB, WR, TE, PK, DEF
Salary = 7000, 8300, 5000
Projection = 10, 20, 30
I need help wrapping my head around how to do the following. I want the script to give me the most possible projected points based on a total salary number and limited to specific amount of players in each position.
QB -1
RB - 2
WR - 3
TE - 1
PK - 1
DEF - 1
Max salary of 60k.
Any help is greatly appreciated.