Lets say I have an Array that looks like below when output threw print_r(). So now i want to insert this array data in mysql database. NOTE : In this array key is the name of table column . So below is the simple function to do this - …
This is a very common interview question. If you are going for the interview then you have to know the difference between these. Below is the basic difference of PHP-4 and PHP-5 - 1 - PHP-4 is a procedural language where as PHP-5 is a object ori…
The InnoDB storage engine provides secure transaction capability. A transaction is a logical groping of statements that is handled by the database server as a single unit. Either all the statements execute successfully to completion or all modificat…
Every developer have confusion in there mind while they are using ISSET() and EMPTY() .He/She always confuse where he have to use ISSET function or where they have to use !EMPTY function in php. But as of now no one have confusion in there mind becau…
There is some situation when you need to check a whole paragraph is in upper case or lower case in php coding. Below is simple function which will help you to solve your problem: *******************************************************************…
This is a great interview question because even if you do not know the answer, you could come up with a fairly accurate answer on your own with some basic knowledge of PHP sessions and some analytical thinking. See if you can possibly think of …
If you want to send multiple attachment in mail then here is my fully tested and running code below .You just need to copy and paste in your php file. After making some little changes you can use this below code -- x------------------------------…
Some time when you need to send an attachment in mail using php.Here i am given a simple and tested code you just need to copy and paste the entire code in your php file.After make a some little changes your script is ready to use-- x-------------…
Most of downloading script is not working in ie and rest of all other major browser. But this script will be working fine in all major brouser ? Please have a look on below code of header its working fine on all major browser.You just need to cop…
There is a situation when you need to check user agent (means that website is open in pc or iphone).Here is a simple javascript function which you return that web page is open in which user agent.Please have a look on below example - Example : …
If you want to delete first or last element of array .Then you can use two very useful php functions 1- array_shift() --- It delete the first index and value of an array. 2- array_pop() --- It delete the last index and value of an array. Example…
I want to count the total number of element of an array.But my problem is that when i am counting the element of array using count() or sizeof() function then its also count that index which value is empty . My array is below :-- Array ( [sea…
Every time when you creating and submitting a form then you will see that form fields are filled every time after submit form.Actually it takes data from brouser catche memory.Some time you don't need that data for security reason or may be any o…
If you have problem to resize your image in php then using this simple class file and resize your image very simple. What you need to do: (a)-You just need to copy the entire code below and paste it into a file name Simpleimage.php . class Si…
There are times when we are so anxious to jump into creating something new that we forget to cover the basics. For web developers it is important, actually vital, to have the ability to test your projects locally before they go live. While much o…
PHP development began in 1994 when the developer Rasmus Lerdorf wrote a series of Common Gateway Interface (CGI) Perl scripts, which he used to maintain his personal homepage. The tools performed tasks such as displaying his résumé and recording his…