If…Else Statements in PHP

Conditional Statements is using to, execute some code if a condition is true and another code if the condition is false.

Syntax (Single Line):
if (condition) Program will executed if condition is true;

Syntax (with else condition):
if (condition)
Program will execute if condition is true;
else
Program will execute Read more

Switch statement in PHP

Conditional Statements is using to, execute some code if a condition is true and another code if the condition is false.

Syntax:
switch (variable)
{
  case value1:
    Program will execute if ‘variable’ value is equal to ‘value1’;
    break;
  case value2:
    Program will execute executed if ‘variable’ value is Read more

PHP Array functions

PHP have some inbuilt functions for managing arrays, functions are

array_change _key_case
Returns an array with all string keys to lowercase or uppercase letter(s).
array_chunk
Split an array into chunks
array_combine
Creates an array by using one array for keys and another for its values
array_count _values
Counts all the
Read more

The basics of a Class in PHP

Basic class definitions begin with the keyword class, followed by a class name, followed by a pair of curly braces which enclose the definitions of the properties and methods belonging to the class.

A class may contain its own constants, variables (called “properties”), and functions (called “methods”).

Class
<?php

class

Read more