Posts Tagged ‘PHP’

PHP Full Form, Introduction and Definition or Stands for

PHP Full Form PHP Introduction | PHP Definition PHP is web server scripting language, introduced by Rasmus Lerdorf in 1994. PHP is one of the very popular web server scripting language, because it is simple and open source. PHP was Created in 1994 by Rasmus Lerdorf, initially PHP was a simple set of Common Gateway Interface (CGI) binaries […]

PHP Basics and Code Example Syntax of It Embed in HTML

Basic Syntax of PHP PHP Basics PHP Basics tutorial presents the core Syntax of PHP and its use in connection with how we can embed PHP Code in HTML. The term PHP block is also discussed. First and most important point is that the PHP is written in the PHP file on top of the HTML syntax. The PHP […]

PHP Comment Syntax with Single Line and Multiline

PHP Comment PHP Comment Syntax PHP Comment is used to disable some code part in the PHP block. Suppose you are developing a PHP script and you want to disable some part of the code for debug. In that case you can comment that part of the code temperately. Or sometimes used to provide remark about the […]

Dynamic vs Static Website | Dynamic Website Definition

Dynamic vs Static Website Static Website Definition Static Website means the web server have web pages files stored in the disk and each of the web page have a unique URL (Uniform Resource Locator). URL is nothing but it is a unique address of each web page on the Internet. When a user on the Internet request a web […]

PHP echo Function Applications Syntax and Example Code

PHP echo Function PHP echo Function echo function is used to print some text output in the plain HTML markup. In the PHP block, echo function is the simplest way to print any text output. echo function can be used to print text or variables in the PHP script. Warning: In the PHP block, if you create a […]

PHP Variables Define or Declaration with HTML Syntax

PHP Variables Types Define PHP Variables Variable is used to store a piece of information or data to use this information or data throughout the PHP page. In PHP variable name starts with $ symbol. Example 1 – Variables use and code with echo In the above examples, we declare two variables($x, $y) and also print these variables. Fig.1 […]

PHP Variables Data Type with Example of Int, Float, String and Boolean

NULL Variable Data Type PHP Variable Data Types PHP Variables data type is used to define which type of variable you stored in your variables. PHP Supports 8 different data types of variables. Followings are the different types of PHP Variable Type. String Integer Float/Double Boolean Array Object NULL Resource PHP String Variable Type String is a set of […]

PHP Constant and Its Example Code Syntax

Global Constant PHP Constant PHP Constant is also similar to the PHP VAriables but the value of Constant cannot be changed or Constant has a fixed value. If you want to create a constant then you have to use the “define()” function. Example 1 – Constant Syntax In the above examples, we have shown how you can […]

PHP Operator with Example Code for Arithmetic, Comparison, Assignment, Increment, Decrement And Logical l and Conditional

Arithmetic Operator PHP Operators To perform the operations like- Arithmetic Operators Comparison Operators Assignment Operators Increment/Decrement Operators Logical Operators on the variables PHP Operators are used. PHP Arithmetic Operators To perform the arithmetic operations like addition, subtraction, divide, multiplication etc “Arithmetic Operators” are used. Operators Symbol Syntax Description Addition + $x + $y To calculate the sum […]

PHP String functions for Length, Compare, Replace, Find, Uppercase, Lowercase, Search, Reverse

PHP String Length Function PHP String Functions PHP String Functions are to manipulate the string. String Length, String Comparison, String Compare, String Replace, String Find, String Uppercase, String Lowercase, String Search are some string functions in PHP. PHP String Length String Length Function or strlen()is used to get the length of a string. Example 1 – PHP String Length […]

PHP if else Conditional Statement Syntax and Shorthand Code Example

PHP if elseif else Conditional Statement PHP Conditional Statements PHP Conditional Statements are used to perform selected statements based on a certain condition. For example, suppose you want to execute some part of code when the variable $x value is 10. if statement – to execute some part of code when only one condition is true. if…else statement – to execute […]

PHP Switch Case Conditional Statement Syntax and Code Example

PHP Switch Statement PHP Switch Case Statement PHP Switch Case is also a conditional statement. You also say that it is the alternative solution and easy syntax of multiple if statement. It is used for multiple test condition. Switch Case Syntax Example 1 – Switch Case Statement Example In the above code, we describe how you can use […]

PHP For Loop Statement with Break, Continue Syntax Example Code

PHP for Loop Continue PHP for Loop Loops are used to execute a part of code multiple times. Loop is also called iterative statements. PHP supports 4 type of loops such are “for loop”, “while loop”, “do-while loop”,& “foreach loop”. for Loops are used to execute a part of code multiple times. In for Loop initialization, condition and increment/decrement […]

PHP while Loop and do while Statement Break Continue Code Example

PHP while and do while Loop PHP while Loop Statement PHP while Loop is used to execute the part of code multiple times. This Loop is also working similarly to the for loop but has a little bit change in the syntax. All the three statements are broke down into 3 part. Firstly we initialize the variable than give the condition […]

Conditional Ternary Operator in PHP with Code Syntax Examples

Ternary Operator PHP Ternary Conditional Operator Ternary Operator is a conditional assignment in which you can assign the condition as well as either two different values that can be assigned to the target variable based on the condition. Ternary Operator performs conditional operators. Ternary operators simplify some PHP conditional statement. But not simplify all the PHP conditional […]

Basic Built in Functions in PHP with Code Example

PHP Basic Functions Basic Built in Functions in PHP PHP have many built-in functions that you can use this function and perform some basic task, for example, date(), time(), array() and many more. More than 1000s built-in functions are defined in the PHP. Some PHP Pre-defined Build in Functions date() time() strlen() str_replace() phpinfo() php_uname() extension_loaded() Phpversion() ini_set() […]

PHP User Defined Function Syntax & Example Code with Return Parameter

PHP Factorial Function PHP User Defined Functions PHP User Defined functions mean that a function which is created by a user. The declaration of the user-defined function will start with the “function” keyword. Syntax of PHP user defined function deceleration Note: The name of the function must be started with a character and underscore not to be with […]

PHP Variable Scope Local, Global and Static in Function Example Code

PHP Local Variable Scope PHP Variable Scope The scope is a boundary or limit where you can access the variable and it depends on the type of the variable. PHP supports local, global and static variable types. Local Variable Scope Local Scope means the variable is accessible within the same function where it is created. Example 1 – Local […]

PHP Array with Numeric Indexed Values

PHP Array With Loop PHP Array PHP Array is used to store more than one element which is identified by the index. In PHP Arrays are of three types – Index arrays Associative arrays Multidimensional arrays Caution:To create an array you have to use array() function. PHP Index Array In PHP Index Array the data will be stored and […]

PHP Associative Array or String Indexed Example Code foreach Loop

PHP Associative Array PHP Associative Array PHP Associative Array is also used to store more than one element and which is identified by the string. It also knowns as string indexed array. Syntax Of Associative Array creation and accessing. The above syntax are used to create an associative array. The above syntax have 2 different ways to create […]

PHP Multidimensional Array in Numeric Indexed Value Example

PHP Multidimensional Array with echo PHP Multidimensional Array PHP Multidimensional Array means array inside an array. Or An array containing more than one array. Its structure behaves like metrics. In Multidimensional array, the data are stored in a tabular form (row-column formate). Syntax of Multidimensional Array in PHP Note:The var_dump() and print_r() are the two functions which are used to […]

PHP Array Functions & Example of Add, Reverse, Search, Count, Replace

PHP Array Replace PHP Array Functions Array Function is used to perform the basic task in an array for example count(), array sum(), array search and many more. List of popular pre-defined Array Functions Fuctions Description array() To create an array. count() To known the number of elements inside an array. array_sum() To get the addition of values […]

PHP Date and Time Function Syntax and Format String Example Code

PHP Time Format PHP Date and Time Function The date() and time() function is used to set the format of the date and time. By the date() function, you can set both format date and as well as time PHP date() Function The PHP date() is used to set the format of the date as well as time […]

PHP Include or Require File Function and Difference Between The Two

PHP include VS require PHP Include File Function PHP Include is used to embed a PHP File into another File. Mainly it is used to add the library of user-defined functions. Example 1 – Include File Code to Embed Scripts In the above example, we have created 2 PHP files and one PHP file will be called into another […]

PHP Superglobal or Super Global Variables Uses and Example

PHP Superglobals PHP Superglobal Variables The scope of the superglobal variables is everywhere. List of variables in a particular super global variables depends on the state of the PHP application. PHP have Predefined “Super Global” variables for some specific purpose. Below list shows PHP superglobal variables- $GLOBALS $_SERVER $_REQUEST $_POST $_GET $_FILES $_ENV $_COOKIE $_SESSION PHP $GLOBALS […]

PHP Cookies Use, Application in Example Code to Set, Delete, setcookie

Set Cookie in PHP PHP Cookies By default PHP is a stateless application means you can not track the activity of a user during the accessing of different web pages of the web site. With the help of the cookie, you can set some variable to track the user state. PHP cookie is a Super Global and used to […]

PHP Session Use, Application Example to start, destroy, unset, id

PHP Session Start PHP Session On the internet, the web server does not have any information which user visit the page or how many times. To track the information about the visitor or users which can visit the multiple web pages, during the accessing of multiple pages sessions are generated. Caution: Session variables are stored on the web […]

PHP Form Handling or Processing in Application with Example Code Syntax of Submit Data

PHP Form Handling PHP Form Handling or Processing The form submitted by the client machine to the web server is actually received by a PHP script file, and it is known by action attribute of the form tag. The PHP Web server will store all the parameters received from the form in the $_GET or $_POST Global array. […]

MySQL Introduction

MySQL Introduction MySQL is one of the popular Database Management System. The full form of MySQL is Structured Query Language. The data are stored in a table form in MySQL. Every column has a specific data type that you can specify during the creation of the table. You can perform the opertions such are – […]

phpMyAdmin Introduction and Create & Open the Database

How To Open phpMyAdmin phpMyAdmin Introduction phpMyAdmin is one of the most popular applications of the MySQL Database Management System(DBMS). It is an interface to interact with MySQL Database. With this software, you can create, delete, alter, drop, import and export the MySQL database. Caution: If you work on the local machine than you have to install the XAMPP […]

phpMyAdmin Create Table

Structure Of Created Table phpMyAdmin Create Table MySQL Stored data in the table form or row-column format. So you have to create a table first in the phpMyAdmin interface. Step 1 – To create a table you have to create a database first. After creating a database you have to write table name to the Name block and select […]

How to Use phpMyAdmin and How select, insert, update, delete and drop table

phpMyAdmin Insert How to Use phpMyAdmin Through phpMyAdmin, you can perform many operations like insert, select, update, delete and drop in the table. These operations are done through the SQL Queries. How to Insert in phpMyAdmin If you want to add the new information to a column then you have to use insert SQL Query. Step 1 […]

PHP MySQL Connection With MySQLi Example Code and mysqli_connect Function

PHP MySQL Connection How to Drop Table in phpMyAdmin From the PHP script if you want to access the MySQL Database you have to first create a connection to the database server with the help of mysqli_connect mysqli function. MySQL Examples in Both MySQLi and PDO Syntax In this, and in the following chapters we demonstrate three ways […]

PHP MySQL Create Table Query With MySQLi Example Code and MySQLi_query Function

Create a MySQL Table Using MySQLi The CREATE TABLE statement is used to create a table in MySQL. We will create a table named “User”, with five columns: “id”, “firstname”, “lastname”, “email_id” and “age”: Example – 1 Create a MySQL Table Example ` Important points of the table above: The data type specifies what type […]

PHP MySQL insert Query Syntax into the Table with MySQLi Example Code

PHP Insert Data Into MySQL To insert a data in the MySQL database you have to use insert query. In other words Insert is used to add new records. Important points The string must be quoted. Numeric values must not be quoted. The word NULL must not be quoted. In the previous artical we created […]

PHP MySQL select Query Syntax From the Table with MySQLi Example Code

PHP Select Data in MySQL To select data from the table select query is used. To select all row so you have to use ” * ” symbol. But if you want to select a particular row or column so you have to put the name of a particular row or column. Example – 1 […]

PHP MySQL update Query Syntax in the Table with MySQLi Example Code

PHP Update Data in MySQL To change the value of previously saved recode, we have to use the update query. In other words update query is used to update existing records. Caution:Here you have to use the where clause and where clause is used to define which records should have to update. If you can […]

PHP MySQL delete Query Syntax from the Table with MySQLi Example

PHP Delete Data in MySQL To delete the value of previously saved recode, we have to use the delete query. In other word, the delete query is used to deleting the existing records. Note:Here you also specify the where clause and where clause is used to define which records should have to delete. If you […]
Learning & Certifications
Follow Us
Facebook Icon   Linked In Icon   Twitter Icon  
Validation and Recognition

Valid CSS! Valid HTML5!          Protected by Copyscape