php array

Getting the Similar and Difference Between Arrays in PHP Tutorial

Submitted by oretnom23 on

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

Submitted by oretnom23 on
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

Submitted by oretnom23 on

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.

Sorting Array by Key and Value in PHP Tutorial

Submitted by oretnom23 on

In this tutorial, you will learn how to sort a PHP Array by its Key and Value. PHP have different built-in function on sorting an Array. There is sort(), rsort(), asort(), arsort(), ksort(), and krsort(). Each of the listed functions has same goal of returning the array which sorting them but the difference are how they are being sorted.

Basic Array Functions in PHP

Submitted by nurhodelta_17 on
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.