Custom code with php is commented

Hello! I have searched the forum and have not found a solution (although it has been commented on once). When I insert custom code with php and export the code, Bootstrap Studio comments out the PHP code. How I can avoid this? Thank you very much in advance.

(sorry for my english, it’s a machine translation)

If you open with the full tag like:
<?php yourcode ?>

Then it should work fine

if you try the short tag:
<? your code ?>

Then it doesn’t show

EDIT: actually, it works with both as well as <?=

Hi Richards, thank you very much for your reply.

I have tried with both options and in both comments the result.



You are looking at it in your development tools which is commenting it out.

If you open the file in vs code you will see it is as it should be, and will run once on your php server

Screenshot: left actual code (opened in vs code) - right: chrome development tool - same file

It’s true! Thank you very much. Also I was trying to view PHP in a .html file. I thought that bootstrap switched to .PHP automatically. Thanks again