Some people may say: My job is creating forms in WordPress, why would I learn things that have no direct connection to my job and that I won’t ever need in real life. And my answer is that if you don’t learn them, then making those WordPress forms will be your job for your entire life.

General programming awareness

Understanding the “big O notation”, what it means and why it matters
Array data structures as they are defined, not as they are implemented in PHP. How is the n-th element of an array accessed in memory.
At least one other fundamental data structure (linked list, queue, stack)
Being able to implement at least one O(NlogN) sorting algorithm
Understanding recursion. This really goes without saying

Continue Reading →

Strings in PHP can be specified in four different ways: single quoted, double quoted, heredoc syntax and (since PHP 5.3.0) nowdoc syntax, the first two of them being by far the most frequently used.

It is important to know the difference between using single quotes and double quotes. In this post we will see the difference between them and which should be used when.

 

Single quoted strings are the easiest way to specify string. This method in used when we want to the string to be exactly as it is written. When string is specified in single quotes PHP will not evaluate it or interpret escape characters except single quote with backslash (‘) and backslash(\) which has to be escaped.

1
2
echo 'This is \'test\' string';
//Output: This is 'test' string

Continue Reading →

Creating the Database

Create database “login” and create table “members” :

CREATE TABLE `members` (
`id` int(4) NOT NULL auto_increment,
`username` varchar(65) NOT NULL default '',
`password` varchar(65) NOT NULL default '',
PRIMARY KEY (`id`)
);

INSERT INTO `members` VALUES (1, 'naveen', '123456');


 Continue Reading →

When a function having same name with different arguments it is called Function Overloading.
Example:

class calculate{
function add($a,$b){
return $a+$b;
}
function add($a,$b,$c){
return $a+$b+$c;
}
}
Continue Reading →

In this article on PHP Interview Questions, I have compiled a list of very basic and fundamental PHP interview questions and answers for web developers. Every PHP web developer should know these basic questions of PHP. So, if you are preparing for any interview in PHP development, you should go through the following list of PHP basic interview questions. There PHP questions are based on very simple PHP concepts like basic introduction to PHP, Sessions and Cookies in PHP, Input / Output in PHP, Error Management in PHP, MySQL database connectivity in PHP, SQL Injection in PHP, Encryption and Decryption in PHP, Sending Emails in PHP, datatypes in PHP and many more. Lets have a look…

Continue Reading →