Php Functions

Php Functions Tutorial-Difference between two dates in php

For calculating difference between two dates in php we are make two functions, getDiff and its helping function daysInMonth,getDiff returns difference in array and daysInMonth returns days in month of given year and they are as follow: <?php ...



READ MORE...


Php Functions Tutorial-Stripslashes php function

In php stripslashes() function removes the backslashes in the data (\' changes into ' and \\ into \ ). See in the example. <?php $str="This is Raj\'s book."; echo stripslashes($str); // This is Raj's book. ?>



READ MORE...


Php Functions Tutorial-php date time format

Php date() function returns date format by using timestamp. date(format,timestamp); The timestamp argument is optional. If it is not given by default the value of time() is used. Now see the example of date function for getting mysql ...



READ MORE...


Php Functions Tutorial-Implode and explode in php

In php the implode function joins the array elements with desired glue (character); Take an example, we have array of email-ids and we want to join these ids with comma, we shall do like this. <?php $emails=array("abc@gmail.com",&q ...



READ MORE...