How Does A PHP Script Look Like? Give Example Script With Code


How Does A PHP Script Look Like? Give Example Script With Code
  Forums Index
      » PHP Forums
        » » how does a PHP script look like? give example script with code



How Does A PHP Script Look Like? Give Example Script With Code
Post Description:
Post Tags: how, does, a, php, script, look, like, give, example, script, with, code, free php support, php scripts, php questions, php answers, programming, codes, scripts
This Post Has Been Viewed 253 Times Since Mon May 07, 2007 9:33 pm Posted By webmaster with 0 replies
How Does A PHP Script Look Like? Give Example Script With Code
php exists as a tag indise an HTML file. like all HTML tags, it begins with a less than symbor or opening angel barcket (<), and ends with a greater than symbol. or closing angle braket (>) To distinguish it from other tags, the PHP tag has a question mark (?) following the opening abngle braket and preceding the closing angle barcke. all text outside the php ta is simply passed through the browser, text inside the tag is expected to tbe PHP code and is parsed.

to acomodate XML and some picky editors such as microsoft's fornt page PHP offers three toher way to make code. putting php after the opening questions marks make PHP code friendly to CML parsers. alternative, you amy use the script tag as if you were weriting javascript. finally, you can use tags that appear like ASP, using <% to start blcoks of code.

here is a simple php script that will display today's dat on your browser
first step is to open your text editor. you can use notepad if you are using windows.
then copy and paste this code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Displaying Today's Date</title>
</head>
<body>
<h3 align="center">Displaying Today's Date Script by Wallpaperama </h3>
<hr>
<p>Today's Date is : <?php print(date("1 f d, Y")); ?>
</p>
<p>&nbsp;</p>
<p align="center">PHP Web Hosting Provided by <a href="http://www.webune.com">Webune.com</a> </p>
</body>
</html>

Leave Your Comments
* Your Name

  * Your Email Address (Will Not Be Published)

* Your Comments


Add Picture To Comments
Yes No             upload
Receive Replies on my Comments
(An email will be sent to you when someone replies to your comments)

     




Comments and replies About How Does A PHP Script Look Like? Give Example Script With Code






(0) Comments