PHP General Development tutorials
Learn how to use arrays in PHP.
Related Tutorials
Using Arrays In Php
Arrays 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.
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.
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.
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.
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.
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.
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 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, 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.
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.
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.
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.
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 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.
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.
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.
A HOWTO on Optimizing PHP
PHP is a very fast programming language, but there is more to optimizing PHP than just speed of code execution. In this chapter, we explain why optimizing PHP involves many factors which are not code related, and why tuning PHP requires an understanding of how PHP performs in relation to all the other subsystems on your server, and then identifying bottlenecks caused by these subsystems and fixing them. We also cover how to tune and optimize your PHP scripts so they run even faster.
What is PHP?
What is PHP, and what can you do with it? This gentle PHP introduction explains the basics of PHP and looks at how you can use it to build feature-rich Web pages and applications.
What is PHP and Why Should I Care?
One of the first things most people want to know about PHP is what the initials stand for. Then they wish they had never asked. Officially, PHP stands for PHP: Hypertext Preprocessor.
PHP Basics
In this tutorial, i will teach you how to make a basic php program.. Mainly how to print output from a php script... I hope you will enjoy using PHP as much as i have, and that you will NEVER use ASP again (if you ever have).
PHP Introduction
PHP stands for PHP: Hypertext Preprocessor. PHP is an HTML-embedded scripting language. Much of its syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. The goal of the language is to allow web developers to write dynamically generated pages quickly.
Creating a PHP form
PHP is a great processor of forms, hence knowing how to write a simple form for php processing is the precursor to make the PHP work.
Introduction to PHP
PHP - This tutorial was written to introduce you to PHP, it assumes you know nothing about programming at all, starts with the very basics and slowly guides you through some of the concepts of PHP programming.
Viewsource
A number of websites, including php.net, allow you to view the source code of their PHP pages. This is usually to allow you to see how the page is put together and how the PHP code itself is written. Usually, it is not possible to view the PHP source but with a built in function in PHP, you can.
PHP Comments
Learn how to write PHP comments, and how to comment your PHP code effectively, in this easy-to-follow PHP tutorial.
Associative array with str_replace function
If you are a PHP developer, I'm sure you know the str_replace function for replacing strings and are probably aware that you can pass an array of strings as the search strings and an array as the replacements. What this post looks at is a way of using a single associative array instead of two arrays, which makes dealing with a large number of replacements much more maintainable in your code
Acquiring PHP MySQL
PHP and MySQL are already packaged in Linux and Mac OS X OSs. However, most PHP developer are actually using Windows when developing PHP applications. This is also true to myself. I have Mandrake Linux 10 but I'll just use it for testing purposes of my finished scripts. One reason is that Windows render an amazing web presence unlike any other OS's browsers. So this page will only cover the WAMP ( Windows, Apache, MySQL, PHP ). You will learn how to install Apache, PHP, and MySQL under Windows platform.
Adding PHP to Apache on Linux
This article provides extensive instructions on installing PHP on Apache/Linux. Main topics include: How to Get PHP, PHP Extensions, Building PHP for CGI Use, Building PHP as an Apache Module, Building mod_php as a Dynamically Loaded Object, Testing Your Installation, Going Further/In Conclusion, Building Apache at Lightspeed, Apache Source Components Provided by Linux Distributions, and Fixing Red Hat 6.1's apxs Script.
 
Categories