Here is an example taken from
http://www.w3schools.com/PHP/DEfaULT.asP
<html>
<body>
<?php
echo "hello there";
?>
</body>
</html>
To get your content to be "surrounded" by your cart's design however you will need to create a template ("myphp.tpl")and include it by putting {include file="myphp.tpl"} in x-cart wherever you want your content to be displayed. Its not quite as simple as that but, not really much more difficult either. You may or may not need the "html" and/or "body" tags depending on where you place it in x-cart.
Example: name the following myphp.tpl and save it to the root directory of x-cart
Code:
<?php
echo "hello there";
?>
Now, in xcart-root/skin1/customer/home.tpl find where it says {include file="help.tpl"}. Copy and paste it (putting a <br /> between the old and new, and then change "help" to "myphp". Clear your templates cache (
www.yoursite.com/cleanup.php) and reload the page. "hello there" should appear right after (or before, depending on which instance you modified above) the "News" section.