Its same as in pc,
In pc, you have to write html code in php file..
Same works in sololearn....
You will have to write your html file in a php project, then when you want to write php, open php tags and write then close...
for more information please take a look Kode Krasher's answers in this question..
Maroseios running services on your phone is just going to kill the battery quicker anyway. Have you looked at the http://raspberrypi.org ? It is a little linux based micro-computer that can be displayed over an hdmi input in a tv. it can run a personal web-server with pretty much any configuration you would like.
Another option you could use is get a free learning account on aws or azure, and configure some containers to run the services. Just realize if you share your site or go over your limited usage that you will be charged. 😣
Maroseios look at PHP code in code playground. You will find examples on how to embed html in PHP. There are plenty of examples to get you started.
Steve Sajeev your answer is not entirely correct... With a webserver configured properly you can embed PHP in HTML, but sololearn does not run a PHP server in the HTML or PHP containers; they execute php in a script, calling the php file and let the browser interpret any HTML output. Try to create the common phpinfo() file in PHP code playground and you will see what I mean. It outputs console text and not the standard HTML table that would be displayed from a webserver running a php module or php server. 😉
Are you on Android or iOS?
For Android, try KSWEB (https://play.google.com/store/apps/details?id=ru.kslabs.ksweb), not a perfect one, but it's okay for learning ...
Not an iOS user meself, so I got no recommendation, sorry ...