Posts

Showing posts from January, 2022

PHP Tutorials Home

Image
 PHP Tutorial for Beginners   Table of Contents   Basic PHP       PHP Introduction     PHP Operators       PHP Conditions      PHP Loops     PHP Arrays     PHP Associative Arrays     PHP String Functions     PHP Array Functions     PHP Functions     PHP Super Global Variables     PHP Forms      PHP File Upload     PHP Sessions     PHP Cookies     PHP MyAdmin Tool     PHP with MySQL        PHP Files       PHP Dates       Advanced PHP         PHP OOPs-1        PHP OOPs-2         Interview Questions in PHP         Practice Questions in PHP Basics   Practice Questions in PHP Arrays                                                           Practice Questions on PHP Programmer Defined Functions   Move Top     About PHP Tutorials PHP for Beginners Before stepping into PHP tutorials or PHP Training, It would be recommended having knowledge of front-end technologies such as HTML, JavaScript, CSS, Bootstrap etc. It would be an added advantage if you have  some familiarity with Clie

PHP Basics tutorial Operators

Image
    Learn PHP Operators  PHP provides different types of operators. In this tutorial, we discuss some of the operators that we use in coding very frequently.     Table of Contents Arithmetic Operators Assignment Operators. Comparison Operators   Logical Operators. Incrementing/Decrementing Operators. String Operators     Using different types of Operator in PHP 1. Arithmetic Operators [ + - * / % ] in PHP addition(+) subtraction(-)  multiply(*) division(/) modular(%)   <?php   print ( 10 + 20 + 30 );   ?>     Ex2:   <?php   $num1 = 10 ; $ num2= 20 ; $total = $ num1 + $ num2; print 'Total = ' . $total ;   ?> Operator precedence Order of evaluation of an expression 1 ) / * % 2 ) + - 3 ) =      ex: a * ( b+c/d ) * 22 the correct way is: ( a*b ) + ( c/d ) * 22 According to the expression first it goes to division and finally goes to multiplication addition, at last the result is printed. Ex: a=2, b=3, c=8, d=2 What would be the result. ( 2 * 3 ) + ( 8

PHP tutorial Conditions

Image
Learn PHP Conditions       Using Conditional Statements in PHP Conditional statements checks for the condition. Based on the condition, it selects the statements to execute. PHP provides different types of conditional Statements. In this tutorial, we are going to discuss various conditional statements with syntax and examples. All the conditions uses comparison operators also called as relational operators. And also sometimes uses logical operators to combine one or two conditions while comparing. If no idea on these operators, please visit the tutorial on operators in PHP .   Move to Top Table of contents if() statement in PHP. if.. else    statement in PHP. if..else if.. else   statement in PHP. ternary statement in PHP. switch case   statement in PHP.   1. if statement. Used to check the given expression  is   Yes/No True/False Greater/Less than ..etc.   Syntax: if(condition) {      ...      ... } ex1:    <?php   $a = 5 ;    if ( $a > 10 ) {      print ( "A

PHP tutorial Loops

Image
Understating PHP Loops Beginners Tutorial   What is Loop , Generally, in programming, Loops/Iterations are used to perform some repetitive tasks.  A loop is a block of statements. And that block is executed until some fixed number of times, as specified in the condition. PHP provides different kind of Looping statements also called Iteration statements. They can be used for different purposes such as to print group of values or reading certain number of rows from database or generating some series of numbers etc.    In this tutorial, you will learn types of loops in PHP and how and when to use them? With syntax and example, they are explained.       Table of Contents   While    Loop in PHP.   Do While Loop in PHP. For Loop in PHP. For-each Loop PHP.   Go ToP↑ 1. Using the while () Loop.  Repeating set of statements until given condition is True . When condition becomes false, it comes out of the loop.    Usage ex: To read records from Database, To generate a series of numbers o

PHP Basics Introduction tutorial

Image
PHP Introduction Tutorial  Table of Contents PHP Introduction Web Application Architecture: Why PHP? PHP Program structure Using HTML tags Variables in PHP Comments   Joining with dot operator Data Types in PHP Starting Server Running program in a server Embedding HTML in PHP Embedding PHP in HTML   PHP Introduction  PHP Developed in 1995.  PHP first known as Hypertext Preprocessor.  PHP also called as Personal Homepage Tools(PHP Tools) from version 2.0.  PHP scripts are executed on the server.  PHP is a server-side scripting language, like ASP.  PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC(MicroSoft’s), etc.)