Skip to main content

White space in PHP

White space in PHP :


<html>
<head>
<title>My First PHP Page</title>
</head>
<body>
<?php
echo "Hello World!";                  /*As with HTML, whitespace is ignored between PHP statements.
                                      This means it is OK to have one line of PHP code, then 20 lines of blank space
                                      before the next line of PHP code. You can also press tab to indent your code and
                                      the PHP interpreter will ignore those spaces as well. like from line 9 to line
                                      15 its whitespace but php does not consider it as whitespace*/


echo "Hello World!";
?>
</body>
</html>

Comments

Popular posts from this blog

Cin function

#include<iostream>     // it is  a library used for display #include<conio.h>      // its is also a library used for input output statement using namespace std; main() { int a,b; // two variable are taken as a and b cout<<"enter a value "<<endl; /* as you know cout is used to print out your comment enclosed in " " this                              endl is used for next line */ cin>>a;        /* here is new thing "cin" it is used to input values on running time of program*/ cout<<"enter a value "<<endl; /* as you know cout is used to print out your comment enclosed in " " this                              endl is used for next line */ cin>>b;        /* here is new thing "cin" it is used t...

Temperature Convertor

#include<iostream>     // it is  a library used for display #include<conio.h>      // its is also a library used for input output statement using namespace std; main() { float c,f ;   // as i discussed earlier float is used for floating values like value is decimel so two variable are take  cout<<"Enter the temperature in Fahrenheit  ? :"; // its just comment whatever you want can add here within "" after cout  cin>>f;                                         // giving a value which will convert the program to Fahrenheit c= (f-32)*5.0/9.0;      // it is the formula to convert to fahrenheit cout<<"Temperature in celsius = "<<c; // here its show the value save in the c throgh the formula   } /* Here is your temperature converter to farhrenheid is ready */

Age Calculator

#include<iostream>     // it is  a library used for display #include<conio.h>      // its is also a library used for input output statement using namespace std; main() { int age;           // age variable with datatype int long int age_month; /* long is also a datatype but it can hold more bigger data then int                      so variable age_month with datatype long */ char name[50];     // char is datatype with variable name name it can only hold character like " naveed" cout<<"Enter name of person:"<<endl; // will output Comment "enter the name of person cin>>name;                   //here is input object through which you can enter the name of person cout<<"enter the age of person in year:"<<endl; // here its output the comment "enter the age " cin...