What Is PHP?
PHP is a script language Hypertext
Preprocessor. PHP is a server-side scripting language so that means
that the scripts in PHP are executed on a server now it also supports many
databases one of which we'll be using in the future which is MySQL and it's an
open-source software so it's free is free to download and to use and best of
all it allows web developers to program dynamically generated web pages.
Many Type Databases Supports in PHP
(MySql,Oracle,etc).
PHP Syntax
- <?php
- Echo ‘Hello Infodpsoft’ // Print Statement
- ?>
Application of PHP
-
You can create, write, open, read Files.
-
You can Update Database.
-
You can Delete Database.
How to Ues In PHP In HTML Page.
Program
- <html>
- <head> Infodpsoft</head>
- <body>
- <H1>Hello Infodpsoft</H1>
- <?php>
- Echo ”Hello Infodpsoft”
- ?>
- </body>
- </html>
Type of Datatype in PHP.
-
Array
-
Boolean
-
Doubles
-
Float
-
Integer
-
NULL
-
Object
-
String
How to Declare Variable In PHP.
PHP a Variable Starting in $.
Variable can not Startpoint with a number.
Program
- <html>
- <head> infodpsoft </head>
- <body>
- <H1>Hello Infodpsoft</H1>
- <?php
- $number = 10;
- Echo $number;
- ?>
- </body>
- </html>
Doubles
- <html>
- <head> Infodpsoft </head>
- <body>
- <h1>Double Example</h1>
- <?php
- $a= 5.10;
- $b= 10.5;
- $c= $a + $b;
- print(" Ans is $c ");
- ?>
- </body>
- </html>
Output:
Ans is 15.6
Good work
ReplyDelete