PHP, Wordpress

Useful .htaccess Tricks for WordPress

PHP Developers and WordPress developers some times comes across .htacess file. this file is configuration file for for security and performance. here i will show few usefull tricks to do with .htacess file. This file is located at root of your website (/public_html/) Before we start lets grab the .htacess

Read More...

FAQ, PHP, PHP

PHP interview questions and answers

1)    What does a special set of tags <?= and ?> do in PHP? 2)    What’s the difference between include and require? 3)    I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what’s the problem? 4)    Would I use

Read More...

PHP

PHP Arrays

An array is a concept of declaring a variable in which multiple values can be stored or An array stores multiple values in a single variable.. an array in PHP is compound type. An array is actually an ordered map. A map is a type that maps values. Each element

Read More...

PHP

Data Types and Built in functions

PHP supports 8 data types scalar data types( A variable in which only one value can be stored at a time Boolean integer Float / Double String Compound data type (A variable in which multiple values can be stored) Array Object Special data types resource Null The type of variable

Read More...

PHP

variables and output statements in PHP

We have 2  functions for output in PHP those are echo() and Print () actually output statements used to send output to the client (browser) differences between echo() and print() are echo() is faster than print() in execution print() is return an integer value where echo() dosent return a value

Read More...

PHP

Operators in PHP

Operators are used to perform some operations on data operators are broadly classified into 2 categories Unary operators An operator  that requires only one operant in unary operator. Ex: $a++ in the above statement a is operant and ++ is operator Binary Operator An operator that require two operant is

Read More...

PHP

Introduction to PHP

Hi Guys Let me teach about PHP in easy steps. First of let me explain what is Programing Language. “ A Programing language is artificial language used to express  computer that can be performed with a machine, particularly Computer.” PHP is recursive acronym stands for  Personal Home Page, it is

Read More...

PHP

Installing PHP in local system with XAMPP

HI guys If we want work with PHP we need following products in our system . PHP Database server mail Server FTP client (Used to upload and download the content to the server) A tool for remote Database administration. The following installers can be used to install all the above

Read More...

PHP

Conditional Statement

Everybody knows how the Statement works in programing languages as PHP developed from C language lets directly go for sample programs. We have 4 Conditional Statement in PHP they are Switch statement IF statement Simple If IF – else IF – elseIF – else Nested IF Switch Statement:- <?php $X=”a”;

Read More...

PHP

Local and Global variables in PHP

Local variable: A variable which is specified in a function is known as local  variable. local variable is accessible only with in the function where it was declared. the life time of a local variable is with in the function. Global Variable: A variable which is specified outside of a

Read More...

PHP

PHP Class abstraction and Interfaces

Class Abstraction ================= PHP 5 introduces abstract classes and methods. It is not allowed to create an instance of a class that has been defined as abstract. Any class that contains at least one abstract method must also be abstract. Methods defined as abstract simply declare the method’s signature they

Read More...

PHP

PHP String handling functions

we have a lot of php predefined constants for string handling. lets have a look on few of them strlen() this function was used to find the length of the string. Syntax: strlen(variable name) str_replace() used to replace a part of string with another string. Syntax: str_replace(search,replace,[number of replaces]) str_ireplace()

Read More...

PHP

PHP reverse a number

PHP program to print a number in reverse order <?php $num=123456789; // Give the number which you want to print in reverse order echo $num; echo “<br>”; $revnum=0; do{ $revnum=($revnum *10)+($num % 10); $num=(int)($num / 10 ); }while($num>0); echo $revnum; ?>

Read More...