+ 2

How to align text in php?

I have been trying to align some texts to the centre on sololearn compiler....but its not working...the text stays on the left :/

22nd Mar 2017, 7:56 AM
DEF4LT_
DEF4LT_ - avatar
3 odpowiedzi
+ 12
try center tag <?php echo "<p><center>i am center</center></p>" ?> old tag but still working, i've try i on code playground. there is a way to use css in php code. but a little bit longer than the code above.
22nd Mar 2017, 8:29 AM
Agus Mei
Agus Mei - avatar
+ 4
you must use css for this. choose web then use php and css code. if you choose php it wont allow css as well.
22nd Mar 2017, 8:03 AM
Andre van Rensburg
Andre van Rensburg - avatar