Wednesday, September 26, 2012

Date Programming..

<html>
<body>

<?php

$d=date("D");
if ($d=="Fri")
  {
  echo "Have a nice weekend!";
  }
else
  {
  echo "Have a nice day!";
  }
?>

</body>

</html>

Labels:

Advance of First PHP program

<html>
<title>
Noob Learning
</title>
<head>
<style type="text/css">


div#start{
    font-family:Verdana, Geneva, sans-serif;
    font-size:14px;
    color: #000;
    text-align:center;
    width:400px;
    height:54px;
    border:4px solid #06F;
    margin:0 auto;
    line-height:24px;
    border-radius:6px;
}

p{
    font-style:italic;
}
</style>

</head>
<body>

<div id="start">
<?php

echo '<p><b>Welcome to SAM Noob World</b></p>';

?>
</div>

</body>
</html>

Labels:

First PHP program

<html>
<body>

<?php

echo "Hello World";
?>

</body>

</html> 


Save it as hello.php

Then Add some jquery or CSS effect with it and get enjoy.

Labels:

Basic PHP Syntax

At last I think I will start as a Beginner. Yeah I again start this for my future baby :)

Sorry welcome to PHP zone. We here learn everything from noob to professional.

So our first topic is basic php syntax. So if you want to write some php code then you need to start with a php syntax and that will be

<?php

?>

Labels: