<?php
echo ".body{";
echo " background-color:". get_background_color() .";";
echo " background-image: url(". get_background_image() .");";
echo "}";
?>
<?php
echo <<<HTML
<html>
<head>
<style>
a { display: block; }
p { display: inline; }
</style>
</head>
<body>
<h2>CSS Display</h2>
<a href="http://www.tizag.com/" target="_blank" class="disp1">Tizag.com - Learn to Whip the Web</a>
<a href="http://www.tizag.com/" target="_blank" class="disp1">Tizag.com - Learn to Whip the Web</a>
<a href="http://www.tizag.com/" target="_blank" class="disp1">Tizag.com - Learn to Whip the Web</a>
<a href="http://www.tizag.com/" target="_blank" class="disp1">Tizag.com - Learn to Whip the Web</a>
<a href="http://www.tizag.com/" target="_blank" class="disp1">Tizag.com - Learn to Whip the Web</a>
<br />
<p class="disp1">These paragraph </p>
<p class="disp1">elements </p>
<p class="disp1">have been </p>
<p class="disp1">inlined.</p>
</body>
</html>
HTML;
?>
Very bad example somik.
<?php
/**
* @author Somik
* @copyright 2012
*/
// main PHP codes goes here
setcookie("test",$testvalue);
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html" />
<meta name="author" content="Somik" />
<title>Untitled 2</title>
<style type="text/css">
body{
background-color: black;
background-image: url(/path/to/image.jpg);
}
.tbl_main{
border: 0px;
border-collapse: collapse;
}
</style>
<script type="text/javascript">
// Javascript goes here
</script>
</head>
<body>
<table class="tbl_main">
<tr>
<td>
<?php echo $value[1]; ?>
</td>
<td>
<?php echo $value[1]; ?>
</td>
</tr>
<tr>
<td colspan="2">
<?php myfunction($data1, $data2); ?>
</td>
</tr>
</table>
</body>
</html>
<?php
// PHP functions goes here
function myfunction($data1, $data2){
echo $data1 + $data2;
}
?>
LOL!
Yes, you can break the php codes with ?> and write HTML, CSS, javascript and whatever you need. Then when you need PHP again, just put it in between PHP tags <?php and ?>
Follow instructions on this site for more info: http://www.tizag.com/phpT/