Working with Arrays in PHP
This tutorial is temporarily unavailable, please try related tutorials.
Related Tutorials
Using Arrays In PhpArrays are widely used, because of the lack of features in normal variables. That's why you can find arrays is most of the common programming languages. PHP also uses arrays in a very easy way. This tutorial will cover the basics of arrays.
Array functions in PHP
If you work with PHP and databases, you will most guaranteed have to work with arrays. Arrays are great for holding lots of information in a simple, but organized way. This tutorial gives you the basic functions that is useful when working with arrays.
Arrays and PHP: A Primer
For many years, arrays have been used to logically store and sequence data. They have also been the point of confusion for many developers. In this article, Tuna will talk about the structure of arrays and how you can create and manipulate arrays with the PHP scripting language.
Working with Arrays
When simple variables are just not good enough, arrays come into play. The array section in the PHP manual, available at http://php.net/array, lists approximately 80 functions that are helpful. Therefore, this tutorial could be filled with array-related code alone. However, not all of these functions are really used often. Therefore, this tutorial presents the most important problems you'll have to solve when working with arraysand, of course, solutions for these problems.
PHP Script Tips - Manipulating Arrays with Built-in Functions
A collection of 19 tips on PHP functions on arrays. Clear answers are provided with tutorial exercises on searching keys and values, sorting arrays, merging two arrays, looping on array elements, expanding and truncating arrays.
PHP Arrays
When i first started learning PHP arrays confused me. I learned Perl first; arrays and variables in Perl are represented with different symbols. Not so in PHP, an array looks exactly the same as a variable, it starts with the dollar ($) sign.
Arrays
Arrays are sets of data which can be defined in a PHP Script. Arrays can contain other arrays inside of them without any problems (called a multidimensional array). Arrays can be referred to as tables, even temporary databases. Making an array is very simple, using the array function.
Understanding PHP Arrays and Their Basic Operations
A collection of 11 tips on PHP array introduction. Clear answers are provided with tutorial exercises on declaring and creating arrays, assigning and retrieving array elements, identifying elements by keys and indexes, copying arrays.
PHP Arrays
We cover what arrays are, what they are used for and how to work with arrays in PHP.
PHP array
In this tutorial I will show you how to work with arrays in PHP. You will learn how to create, sort or print an array. Besides this we will touch on multidimensional arrays as well.
Arrays, HTML, and PHP
This 4-page tutorial guides you through step-by-step how to pass arrays and using checkboxes/select boxes in PHP.
Multi-page Forms with PHP
This article will touch on two skills in the interface between PHP and HTML forms, specifically in working with hidden fields, and as a bonus, in passing arrays in an HTML form.
An Overview of Arrays in PHP
An introduction to arrays.
Introduction to Serializing
Serializing is a technique that allows you to turn variables, arrays, functions or objects from PHP into a form that can be used to store them, and when needed, convert them back into PHP. Serializing is useful for flatfile applications that store things in arrays, and are good for CMS features that can let you edit how it works to an advanced degree.
Getting Started with PHP
Covers the basics of PHP. Introduces the PHP tags, variables, arrays, function syntax, if/else statements, and more.
Arrays in PHP
Learn how to use arrays in PHP.
Welcome to PHP
This is a comprehensive article / tutorial on programming in PHP. It covers a variety of key topics including PHP Structure, Scalar Variables and Data, Data collection: Arrays, Operations and Comparisons, PHP Comparison Operators, PHP Logical Operators, Control Statements, The Function of Functions, and Object Orientation.
Working with Objects in PHP 5
This article explains the process of working with Objects in PHP 5. The author defines Objects, Classes, Properties and Methods among several other topics. This author gives you the basis to use PHP 5.
PHP, The Nitty Gritty: Lesson 1
This is an introductory article on PHP programming. Some of main topics covered include: Variables, Strings, Arrays, Comparison Operators, and Control Structures.
Setting array keys and displaying the data
Arrays in PHP are variables which can hold more than one data item. Actually, they can hold many. This is useful if you need to hold a recordset or list of data, often needed in PHP scripts.
Programming your own framework Part 2 MVC
This is part 2 of the programming your own php framework view part 1. The below article was authored by Terry Smith. Terry is an aspiring entrepreneur and PHP code ninja working for b5media. He spends his weekends and free time working on all sorts of crazy ideas and one day wants to rule the world (or a small part of it)
File Upload
In this tutorial we'll be creating a basic File Upload System. This tutorial only requires you (preferably) to have a basic understanding about PHP variables and loops. Although, some pre knowledge about PHP arrays wouldn't hurt either!
PHP and MySQL - Introduction
The topics covered in this tutorial include: * PHP basics, including script structure, variables, supported types, constants, expressions, and type conversions * Condition and branch statements supported by PHP, including if, if...else, and the switch statements * Looping statements * Arrays and array library functions * Strings and string library functions * Regular expressions * Date and time functions * Integer and float functions * How to write functions, reuse components, and determine the scope and type of variables * An introduction to PHP object-oriented programming support * Common mistakes made by programmers new to PHP, and how to solve them.
Basic mySQL Queries And PHP
This tutorial will help you get started in working with mySQL and PHP. It will assume that you have no prior experience in using mySQL with PHP before. After reading this tutorial, you should get an idea on what a database is, how to use it, and how to access it.
Arrays
This tutorial describes: What is an array in PHP, Array related functions.
Using Type Juggling/Type Casting to Modify Data Types
We're going to be dealing with type juggling in this article. This is the process of instructing PHP how to handle the value after the type juggling. Type juggling can do absolutely all sorts, from converting integers to floats, arrays to objects, and even strings to binary as of PHP 5.2.1. It can also save you calling various functions and thus making your script quicker.
Using PHP to search a MySQL database and return paged results
PHP, MySQL and a Web Server capable of parsing PHP pages, like Apache or IIS. This search script does not spider all your pages by crawling the links, so the content you want to be searchable must be within the database. Knowledge of PHP and MySQL is also necessary because this script is just the bones of a working solution.
Working with Directories
As is necessary for any language, PHP has a complete set of directory support functions. PHP gives you a variety of functions to read and manipulate directories and directory entries. Like other file-related parts of PHP, the functions are similar to the C functions that accomplish the same tasks, with some simplifications. This tutorial describes how PHP handles directories. You will look at how to create, remove, and read them.
PHP and XML
In this tutorial we'll go thru the possibilities of an XML manipulation by the PHP. We'll also take a look at explanatory source code of fully working mini RSS feed reader.
Form Handling
We are going to be working with the $_Post or $_Get arrays. They basically tell the form if i needs to post something, or get something. In this case we are going to be showing you the basics of a contact email form, so we will be using the $_Post array.
Using the Internal Array Pointers to Access Elements in Arrays
The native array pointer functions in PHP allow you to traverse an array without actually referring to specific array elements. They can be particularly useful if you're using an associative array and wish to use the first element in the array. An internal array pointer, in PHP, is fundamentally an invisible pointer that points to a particular record in an array.
Basic mySQL Queries And PHP
This tutorial will help you get started in working with mySQL and PHP. It will assume that you have no prior experience in using mySQL with PHP before. After reading this tutorial, you should get an idea on what a database is, how to use it, and how to access it. You can then go ahead and start reading on the many more advanced topics regarding database systems.
Using arrays
Instead of having our information (variables or numbers) in variables like $Mydata1, $Mydata2, $Mydata3 etc, by using arrays our information may be contained in an unique variable. Very often, we will create an array from data obtained from a table with only one column.
Using arrays: basics
Instead of having our information (variables or numbers) in variables like $Mydata1, $Mydata2, $Mydata3 etc, by using arrays our information may be contained in an unique variable. Very often, we will create an array from data obtained from a table with only one column.
Using Arrays (with EXPLODE)
Arrays are a collections of data, grouped into one variable, along a variety of streams. For example, I might have 6 names in one array, and to access the names I'll use $names[0], $names[1], etc. This function is often used with the FOR and FOREACH functions, but as this tutorial is written for beginners, I'll stick to using the WHILE() statement instead.
Working with dates and times in PHP
The date and time functions allow you to use the time of the server that PHP is running on so keep in mind that this function will depend on the local setting of your server.
Create image with PHP/GD and adding fonts on the fly
This GD Library thing is one of the cool features started from PHP 3.0 , this one page tutorial lets you see the basic concept of GD library`s working . and how to add fonts etc.
Type hinting with PHP
PHP has supported type hinting for parameter functions from version 5.0 for objects and from version 5.1 for arrays. Type hinting means the function specifies what type the parameter must be and if it is not of the correct type an error will occur. Type hinting is not supported for other types, e.g. for strings and integers.
Multidimensional Arrays
Array does not have to be a simple list of keys and values; each array element can contain another array as a value, which in turn can hold other arrays as well. In such a way you can create two-dimensional or three-dimensional array.
PHP Calculator
Make a working calculator using PHP.

Adobe Fireworks
Adobe Flash
Adobe Illustrator
Adobe Image Ready
Adobe Photoshop
3D Studio Max
Cinema 4D
Maya 3D
Microsoft Excel
Microsoft PowerPoint
Microsoft Word
Microsoft Access
MySQL
C and C++
Python
Visual Basic
.htaccess
Adobe DreamWeaver
ASP
CGI & Perl
CSS
Java
JavaScript
Microsoft FrontPage
Windows Vista
Windows 7