Yes! You can insert your own PHP code into a placeholder, please see this article.
If you wish to insert code at the very beginning of a page, add your code to the placeholder's BODY section and click on OK to close the dialog. Right-click on the placeholder > Names and apply the name "<html>".
Does Xara use PHP in any of my web pages?
Please note that you need a PHP server to run PHP code and your pages will need to be renamed with .php at the end. You will have to ask your host if they support PHP pages.
Xara hosting unfortunately does not support PHP pages or Databases.