Working with sessions in PHP is very basic. You can pass values to session as key/value pairs. To store and receive data from sessions are very easy to use.
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. This way, you can create a multi-dimensional array. In this article principles of using multidimensional arrays are explained and source code defining multidimensional array and displaying the array values on the web page is given.
array_fill() fills an array with num entries of the value of the value parameter, keys starting at the start_index parameter. Note that num must be a number greater than zero, or PHP will throw a warning. .
Arrays are a large collection of key/value pairs can stores multible variables in a single variable. Arrays are an ordered map which each key could be mapped to a value.
This is a short introductory tutorial on PHP by the official PHP Web site. Explains what it is, what it looks like, what it can be used for. Also includes external links to other useful PHP-related sites.
Sometimes when you write code, you want to perform different actions for different decisions. You can use conditional statements in your code to do this. In this tutorial we will look at two structures: if...else and switch statements.
You should encode string values while passing in an querystring. We use UrlEncode to Returns a string in which all non-alphanumeric characters except -_. have been replaced with a percent (%) sign followed by two hex digits and spaces encoded as plus (+) signs.
A function is a block of code which can be called from any point in a script after it has been declared. It is basically a compartmentalized PHP script designed to accomplish a single task. Functions are useful because they contribute to rapid, reliable, error-reducing coding, and increase legibility by tiding up complicated code sequences.
It is often necessary to arrange the elements in an array in numerical order from highest to lowest values (descending order) or vice versa (ascending order). If the array contains string values, alphabetical order may be needed. Sorting a one-dimensional arrays is quite easy.
Intended for absolute beginners who are interested in getting started with PHP this tutorial will take you through the basic steps to creating your first ever PHP script.