If you can make PHP write a text file called myvariables.tex, that contains \newcommand{\myPHPvariable}{<the number you want>}, then you can say \input{myvariables} in the preamble of your .tex file, and write \myPHPvariable where you need to use that variable.
– Torbjørn T.Feb 01 '17 at 08:21
myvariables.tex, that contains\newcommand{\myPHPvariable}{<the number you want>}, then you can say\input{myvariables}in the preamble of your.texfile, and write\myPHPvariablewhere you need to use that variable. – Torbjørn T. Feb 01 '17 at 08:21