C C++ Java Data Structure Python JavaScript CSS Ajax PL/SQL PHP Puzzles C programs C++ programs Java programs

Home

PHP Tutorials, Examples

  1. Appending/merging of two arrays in PHP.
    In this article, we will learn how to append arrays in PHP? In order to do it, we will use a built in PHP function called, `array_merge()` which expects parameters in array data type and returns the new array combining the parameters.
  2. How to get the length of the array in PHP?
    In this article, we will learn how to get the length of the array in PHP? There are 2 built-in functions that return us the length of the array: 1) count(), 2) sizeof().
  3. Display source code of the website with PHP.
    In this article, we will learn how to display the source code of the website with PHP?
  4. Delete an element from an array in PHP.
    In this article, we will learn how to delete an element from an array in PHP? There are 2 ways of deleting an element from the array in PHP which are using unset() and array_splice().
  5. Concatenating two strings in PHP.
    In this article, we will learn how to concatenate two strings in PHP? Here, we have two strings and we have to concatenate them.
  6. Calculate difference between dates in PHP.
    In this article, we will learn to calculate the difference between dates in PHP? Using the built-in function of PHP which converts a date in string to date format.
  7. Get the contents of a directory in PHP.
    In this article, we will learn how to get contents of a directory in PHP? It can useful to check if file is already present in the directory or the number of contents in the directory.
  8. How to convert array into string in PHP?
    In this article, we will learn how to convert an array into string in PHP using PHP's built in function?
  9. Setting Cookies in PHP.
    In this article, we will learn how to set cookies in PHP and learn the basics of cookies?
  10. Check if string contains a particular character in PHP.
    In this article, we will learn how to find and check if string contains a particular character in PHP?
  11. How to convert a string to uppercase in PHP?
    In this PHP example, we are going to learn, how we can convert a string to uppercase? To convert string to uppercase, we use strtoupper() method which returns uppercase converted string.
  12. PHP code to make a dynamic countdown timer.
    Here, we will learn how to design/make a dynamic countdown time using PHP code? Here, we are setting a last date time till countdown time will run.
  13. PHP code to create tables dynamically from user input.
    Here, we will learn how to generate a table dynamically using PHP code/script by passing number of rows and columns through form?
  14. PHP code to reverse an integer number.
    Here, we will learn how to reverse an integer number in PHP? This post contains PHP code with output and explanation.
  15. How to pass values between the pages in PHP?
    Learn: How to pass any value between pages in PHP? Here, is a tutorial about passing values from one page to another using PHP.
  16. How to redirect to another page in PHP?
    Learn: How to redirect to another page in PHP? This article contains complete tutorial on redirection in PHP, which you can use to redirect from one page to another.

PHP Examples

This section contains PHP examples with source codes and output.




COMMENTS