php array

Getting the Similar and Difference Between Arrays in PHP Tutorial

This tutorial tackles getting the Similar and Difference Between Arrays in PHP Language. The purpose of this article is to give an idea to students, self-learners, or those who are new to PHP Language on how they can capture or get the different or similar values or keys between 2 arrays. Here, other PHP built-in functions for arrays are also explained.

Dynamic Navigation Tree using PHP Multi-Level Array Source Code

Introduction In this article, I will show you how to Create a Dynamic Navigation Tree in PHP. This kind of feature might be useful for you for your current or future project especially if you are planning to develop a broad and dynamic website or web application. Here, snippets and a sample web application source code are provided. What is a Dynamic Navigation Tree? A Dynamic Navigation Tree is a

Return PHP Array as JSON Data in jQuery Ajax Request Tutorial

In this tutorial, we will tackle about How to Return PHP Array as JSON Data in Ajax Request. Here, I will show you a way on achieving this goal for your current or future project. I will also provide snippets for this tutorial and a sample source code that demonstrates the idea of this tutorial.

What is Array?

Array is a data structure that contains a collection of elements store at contiguous memory location. Each element of an Array is identified by at least one array index or key.

Basic Array Functions in PHP

In this tutorial, I'm going to show you the basic functions in working with array in PHP. I'm going to post tutorials about arrays, so this tutorial is the starting line. An array is a data structure that stores one or more values into a single value. It is useful in defining large number of variables like having 50 variables. Instead of declaring 50 of them, you can store this 50 values into a single variable.

Creating our Functions

The first and last step is to create our page with our functions. I've also included in the comments the definition of each function.