PHP BASICS

PHP
BASICS
Scripting Language : 
 A Scripting Language is a programming language that is used to manipulate, customize, and automate the facilities of an existing system. 
 In such systems, useful functionality is already available through a user interface, and the scripting language is a mechanism for exposing that functionality to program control. 
Scripting languages are easier to learn than compiled languages. 
Scripts get more done in less code and less coding time than compiled languages.

PHP is a server-side scripting language designed primarily for web development but also used as a general-purpose programming language.

Prerequisites before learning PHP ( if used for website creation)

HTML Stands for Hyper text markup language. HTML is the client side scripting language i.e used to design static web page
CSS stands for Cascading Styles Sheets CSS, or Cascading Styles Sheets, is a way to style and present HTML. Whereas the HTML is the meaning or content, the style sheet is the presentation of that document. Styles have a format of ‘property: value’ and most properties can be applied to most HTML tags.
PHP Software Requirement PHP Server
The PHP Community Provides Some types of Software Server solution under The GNU (General Public License). 
These are the following: 
1. WAMP Server     2.   LAMP Server       3. MAMP Server      4. XAMPP Server 
All these types of software automatic configure inside operating system after installation it having PHP, MySQL, Apache and operating system base configuration file, it doesn’t need to configure manually. 
Syntax used in PHP file 
A PHP script starts with 
<?php and ends with ?>. 
This script can be placed anywhere in the document. PHP usually has HTML tags, along with some PHP coding. PHP Syntax: 
<?php PHP Code Here ?> 
Note: The PHP file should be saved using the *.php extension, not *.html, if saved in *.html extension then the PHP code will not be executed.
Example To display an message "Good Morning" following code is executed.
<html>
 <body>
 <?php 
echo "Good Morning";
 //This is a single line comment 
/* This is a comment block */
 ?> 
</body> 
</html>


Comments

Popular Posts