Sometime we need to insert PHP code into Wordpress text widget but by default, Wordpress ignore PHP code into widget. People use plugin for getting this but we can achieve it by using below given code into theme’s function.php.
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.
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.
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 (  => apple => papaya => banana  => grapes )
set_time_limit : set/increase the PHP Script maximum execution time
By default, PHP has a set of seconds limit to execute the script, if some script reach to run then some fatal error occurs.