Php Cannot Access Variable Inside The Formulas