Both cookies and sessions are available in any type of programming language like PHP, and both accomplish much the same task of storing data across pages on your site. However, there are differences between the two that will make each favourable in their own circumstance.

Read More

How to check a value exists in an array is a general requirement when using array. We can do it by iterating through the array one by one and checking that the searched value exist or not. But now a days, everybody expects a short method means using built in functions in the language.

Read More

There are several ways to redirect a user from one URL to another. There might be several reasons to do this. I am describing different ways to redirect a URL or page quickly and seamlessly including redirect URL using JavaScript, use a meta tag, redirect using an htaccess file, redirection using PHP and finally redirect URL in WordPress.

Read More

In this article on PHP Interview Questions, I have compiled a list of fundamental PHP interview questions and answers that were asked in a real interview for a PHP web developer position. Every PHP web developer should know these questions/answer of PHP. So, either you are preparing for any interview in PHP development or are a web developer, you should go through the following list of interview questions in PHP. These PHP questions are mix of basic PHP questions to advance questions that expert PHP engineers know.

Read More

The array_merge() function merges the elements of one or more arrays together so that the values of one are appended to the end of the previous one. It returns the resulting array.

<?php
$A1=array("apple","papaya");
$A2=array("banana","grapes");
print_r(array_merge($A1,$A2));
?> 

Output would be :
Array ( [0] => apple[1] => papaya[2] => banana [3] => grapes ) 

Read More

[ Page 5 of 5 ]