HTML code in PHP file

html
php

#1

I’m making a website that has users login, which grants them access to certain sections. Thus, it seems I will need to use session data in all of my html files, so I’m going to change them to .php files with the same html code inside.

How can I view/preview the html within a php file?


#2

Yes you can preview the html inside your php file once it has been parsed. If for some reason your php code is interfering with the display of the html, simply create a separate html file, copy your html into that file and you can fine tune it in that file. Once you are happy, transpose the html back into the .php file.