• Associative arrays are object-indexed collection of items.  They are also known as key-value pairs where index act as key and its item act as value.   A simple array is used when you want to create collection of items and you want to store them in a certain order.  An associative […]

    Associative Arrays in PHP

    Associative arrays are object-indexed collection of items.  They are also known as key-value pairs where index act as key and its item act as value.   A simple array is used when you want to create collection of items and you want to store them in a certain order.  An associative […]

    Continue Reading...

  • Arrays are nothing more than an integer-indexed collection of items.  An index of an array always starts from 0.  The collection of items in an array could be of any data type like string, int, float or even an another array which forms a nested array.  The length of an […]

    Arrays in PHP

    Arrays are nothing more than an integer-indexed collection of items.  An index of an array always starts from 0.  The collection of items in an array could be of any data type like string, int, float or even an another array which forms a nested array.  The length of an […]

    Continue Reading...

  • We have seen how comparison operators work in PHP with conditional statements.  Comparison operators compare 2 values and return boolean value (true or false).  But we do encounter some scenarios where we want to make our judgement based on 2 boolean values returned by 2 conditions.  In such scenario, logical […]

    Logical Operators in PHP with Example

    We have seen how comparison operators work in PHP with conditional statements.  Comparison operators compare 2 values and return boolean value (true or false).  But we do encounter some scenarios where we want to make our judgement based on 2 boolean values returned by 2 conditions.  In such scenario, logical […]

    Continue Reading...

  • In PHP, if and elseif statements are conditional statements.  They work with comparison operators.  Conditional statements form a block where further code execution depends upon result of a condition.  The condition will return a boolean value (true or false). If statement is always the first statement in the series of […]

    Conditional Statements in PHP with Example

    In PHP, if and elseif statements are conditional statements.  They work with comparison operators.  Conditional statements form a block where further code execution depends upon result of a condition.  The condition will return a boolean value (true or false). If statement is always the first statement in the series of […]

    Continue Reading...

  • In PHP, when we want to compare 2 values, we make use of comparison operators.  These comparison operators are basically used with conditional statements and will return a boolean value (true or false).  Most commonly used comparison operators are given below. Operator Meaning $a==$b $a is equal to […]

    Comparison Operators in PHP

    In PHP, when we want to compare 2 values, we make use of comparison operators.  These comparison operators are basically used with conditional statements and will return a boolean value (true or false).  Most commonly used comparison operators are given below. Operator Meaning $a == $b $a is equal to […]

    Continue Reading...

  • Increment and decrement operators in PHP increment and decrement value by 1.  There are 4 types of increment and decrement operators. Pre-Increment:  ++$variable Post-Increment:  $variable++ Pre-Decrement:  –$variable Post-Decrement:  $variable– Example for increment and decrement operators is given below. [crayon-59ed86856f911376104611/]

    Increment & Decrement Operators in PHP

    Increment and decrement operators in PHP increment and decrement value by 1.  There are 4 types of increment and decrement operators. Pre-Increment:  ++$variable Post-Increment:  $variable++ Pre-Decrement:  –$variable Post-Decrement:  $variable– Example for increment and decrement operators is given below. [crayon-59ed86856f911376104611/]

    Continue Reading...

  • Apart from arithmetic operators, we also have Math functions in PHP.  Click Here for list of Math functions in PHP.  There are few commonly used Math functions given below. Is_int:  This function will check if the passed value is integer or not and return true or false. Is_float:  This function […]

    Math Functions in PHP

    Apart from arithmetic operators, we also have Math functions in PHP.  Click Here for list of Math functions in PHP.  There are few commonly used Math functions given below. Is_int:  This function will check if the passed value is integer or not and return true or false. Is_float:  This function […]

    Continue Reading...

  • Like any other programming language, we do have integer and float data types in PHP.  Integers are whole numbers, can have both positive and negative values like -1, -2, 1, 3 etc.  Floats are known as decimal numbers like 1.25, 3.2 etc.  Using integers and floats, we can perform numerical […]

    Arithmetic Operators in PHP

    Like any other programming language, we do have integer and float data types in PHP.  Integers are whole numbers, can have both positive and negative values like -1, -2, 1, 3 etc.  Floats are known as decimal numbers like 1.25, 3.2 etc.  Using integers and floats, we can perform numerical […]

    Continue Reading...

  • As you know by now, string functions are very useful in manipulating a string.  The list of predefined string functions is huge, so we will discuss only mostly commonly used string functions. Strlen:  This string function will return length of a string. Ucfirst:  This string function will change case of […]

    More String Functions in PHP

    As you know by now, string functions are very useful in manipulating a string.  The list of predefined string functions is huge, so we will discuss only mostly commonly used string functions. Strlen:  This string function will return length of a string. Ucfirst:  This string function will change case of […]

    Continue Reading...

  • There are numerous string functions in PHP.  Two of them are strtolower() means string to lower case and strtoupper() string to upper case.  You can use these 2 string functions in case you want to change the case of a string completely.  Example of these 2 functions is given below. […]

    StrToLower() & StrToUpper() String Functions

    There are numerous string functions in PHP.  Two of them are strtolower() means string to lower case and strtoupper() string to upper case.  You can use these 2 string functions in case you want to change the case of a string completely.  Example of these 2 functions is given below. […]

    Continue Reading...

Page 1 of 212