Php Basics

How to insert array of data into mysql database using php

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 -  …

Difference between php-4 and php-5

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…

What is InnoDB storage engine

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…

Difference between ISSET and EMPTY function

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…

Check paragraph is in upper case or lower case

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: *******************************************************************…

Send multiple attachment in mail using php

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------------------------------…

Send attachment in mail using php

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-------------…

Click and download script in php

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…

Check User Agent ( Weather website is open in pc or Iphone ) in php

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 : …

How to Delete first or last index and value of an array using PHP

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…

How to get only not null array index and value in php

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…

Auto compleate property of form, textbox and textarea

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…

Resize your Image using simpleImage class in php

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…

Steps for Installation and Configure a WAMP Server on your computer

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…

What is php and history of php language

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…

Load More
That is All