Quite possibly there are a lot of points you would first need to consider. PHP is a server-side scripting language (probably based on either C or C++). JavaScript on the other hand is a client-side programming language used in browsers to manipulate the DOM.
They both work separately. You use JavaScript along with PHP, to create a dynamic website; such as ajax requests, loading data etc. They cannot be converted to either one, PHP can never be converted to JavaScript; unless you use
Node.js[
^] to program your website's server-side script in JavaScript.
Then, Android is programmed in Java; JavaScript is just a prototype for Java language. You cannot create applications in JavaScript. Although now a days software (or simply cross-platform) application development has been made possible through HTML5/CSS3/JavaScript to engage more developers to the platform, using clients or frameworks such as
Apache Cordova[
^]. But you won't be able to write native JavaScript applications, why? Because you still have to stick to their API. A simple
alert('Hello world');
call in browser would create a dialog, but in Android you would have to use Apache Cordova's API to generate dialog boxes and all other stuff. My view about HTML and JavaScript programming is that this is the worst case of programming a software, no efficiency, no full framework support, too many factors slowing down your applications and many other factors are due to which I prefer programming an application in native language; Java would be perfect.
So according to the above points, your point of view of converting PHP code in JavaScript for Android programming is a total vague reason to convert server-side scripting code into a software-level client code.
Don't do it!