Times required by Simple interest for the Principal to become Y times itself | Function to return the no . of years ; Driver code
< ? php function noOfYears ( $ t1 , $ n1 , $ t2 ) { $ years = ( ( $ t2 - 1 ) * $ n1 / ( $ t1 - 1 ) ) ; return $ years ; } $ T1 = 3 ; $ N1 = 5 ; $ T2 = 6 ; print ( noOfYears ( $ T1 , $ N1 , $ T2 ) ) ; ? >