PHP Exercises

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

PHP Exercises, Practice, Solution

What is PHP?

PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.

The best way we learn anything is by practice and exercise questions. We have started this section for those (beginner to intermediate) who are familiar with PHP.

Hope, these exercises help you to improve your PHP coding skills. Currently, following sections are available, we are working hard to add more exercises. Happy Coding!

Note: It's fine if you are playing around with PHP codes with the help of an online PHP editor, to enjoy a full-fledged PHP environment (since online editors have several caveats, e.g. embedding PHP within HTML) up and running on your own machine is much better of an option to learn PHP. Please read our installing PHP on Windows and Linux if you are unfamiliar to PHP installation.

List of PHP Exercises:

  • PHP Basic : 31 Exercises with Solution

  • PHP arrays : 59 Exercises with Solution

  • PHP for loop : 38 Exercises with Solution

  • PHP functions : 6 Exercises with Solution

  • PHP classes : 7 Exercises with Solution

  • PHP Regular Expression : 7 Exercises with Solution

  • PHP Date : 28 Exercises with Solution

  • PHP String : 26 Exercises with Solution

  • PHP Math : 12 Exercises with Solution

  • PHP JSON : 4 Exercises with Solution

  • PHP Searching and Sorting Algorithm : 17 Exercises with Solution

  • More to Come !

List of Exercises with Solutions :

  • HTML CSS Exercises, Practice, Solution

  • JavaScript Exercises, Practice, Solution

  • jQuery Exercises, Practice, Solution

  • jQuery-UI Exercises, Practice, Solution

  • CoffeeScript Exercises, Practice, Solution

  • Twitter Bootstrap Exercises, Practice, Solution

  • C Programming Exercises, Practice, Solution

  • C# Sharp Programming Exercises, Practice, Solution

  • PHP Exercises, Practice, Solution

  • Python Exercises, Practice, Solution

  • Java Exercises, Practice, Solution

  • SQL Exercises, Practice, Solution

  • MySQL Exercises, Practice, Solution

  • PostgreSQL Exercises, Practice, Solution

  • SQLite Exercises, Practice, Solution

  • MongoDB Exercises, Practice, Solution

  • Euler Project

[Want to contribute to PHP exercises? Send your code (attached with a .zip file) to us at w3resource[at]yahoo[dot]com. Please avoid copyrighted materials.]