Saturday, February 18, 2012

Outputting A String

Thank you for reading my Blog.
We have done in previous lesson use PHP " echo " .we can also use the "ptint" function as like as C programming.
You can place either a string variable or you can use quotes,like i do below, to create a string that the echo/print function will output.

**************************************
<body>
<?php
$myString="Hello ! Welcome to Mint PHP ";
echo $myString."<br/>";
echo 'I love PHP :)'."<br/>";
print "You can also use print as like as \"echo\".";
?>

Friday, February 17, 2012

Basic Knowledge About PHP

Do you know what is PHP ?
Here some basic things about PHP.
If you know the  C/C++, HTML,CSS & JavaScript than it will be more easier to understand PHP ?
  • PHP is a server-side scripting language, like ASP.
  • PHP stands for PHP: Hypertext Preprocessor.
  • PHP is an open source software.
  • it's free to download and use.
  • PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.).
How Can you understand the PHP files ?
  • PHP files can contain text, HTML tags and scripts.
  • PHP files are returned to the browser as plain HTML.
  • PHP files have a file extension of ".php", ".php3", or ".phtml"
Example:index.php

Let's talk about MySQL:

Thursday, February 16, 2012

PHP - Variables

What do you know about PHP variables ?
A variable is a means of storing a value,such as text string "Hello World" or the integer value.
In PHP you define a variable with the following form :
    PHP Variable declaration:
  • $variable_name = "value";
    Example:
  • $myString = "Hello";
Note:
Keep it on your mind,
If you forget that dollar sign at the beginning, it will not work. this is a common mistake for new programmer!


Wednesday, February 15, 2012

PHP White Space


Important things, keep it on your mind.
White Space is ignored between PHP & HTML.
--------------------------------
<html>
<head>
      <title>White Space </title>
<body>
   <?php 
                        echo 'White';
echo 'Space';
echo 'Can not WORK';

?>
</body>
</html>

Tuesday, February 14, 2012

Simple Example of HTML & PHP Page


Here I give an example of one of the easiest  PHP & HTML page that you can create and still follow web standards.


PHP & HTML CODE :
------------------------------
<html>
<head>
      <title>My First PHP Page</title>
<body>
   <?php
                        echo 'Hello World';
?>
</body>
</html>