You should be able to edit PHP files with syntax highlighting, but the local preview doesn't interpret PHP.


Textastic offers syntax highlighting for many languages including PHP, but it doesn't include compilers or interpreters due to restrictions of iOS.


If you try to preview the php file locally, only the html part will be interpreted by the web view. The PHP part will be ignored.


In order to preview PHP in Textastic, you can upload the file to a test server, open the preview screen, switch from "Local" to "Remote" and enter the remote url of your test server.