linear equation functions in php

Job ID: 32594654

Budget: $10 – $30 USD

1 I need a function that calculate the trend line (A) based on an array of numbers.
2. another set of array numbers is given to. create. the second trendl ine(B)
3. A and B will cross, need to find the value of the cross point