PHP: array_reverse - Manual in Deutsh
PHP: array_reverse - Manual in French
PHP: array_reverse - Manual in Polish

You Are At PHP: array_reverse - Manual Area


recent searches:
include functions , variable functions , post functions...




If you are new to PHP or just need to refresh your skills, this is the place to start. This series of tutorials will give you the basic knowledge you will need to create a simple PHP website.

PHP is a reflective programming language originally designed for producing dynamic web pages.[1] PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.

PHP Manual
PrevNext

array_reverse

(PHP 4, PHP 5)

array_reverse -- Return an array with elements in reverse order

Description

array array_reverse ( array array [, bool preserve_keys] )

array_reverse() takes input array and returns a new array with the order of the elements reversed, preserving the keys if preserve_keys is TRUE.

Example 1. array_reverse() example

<?php
$input  
= array("php", 4.0, array("green", "red"));
$result = array_reverse($input);
$result_keyed = array_reverse($input, true);
?>

This makes both $result and $result_keyed have the same elements, but note the difference between the keys. The printout of $result and $result_keyed will be:

Array
(
    [0] => Array
        (
            [0] => green
            [1] => red
        )

    [1] => 4
    [2] => php
)
Array
(
    [2] => Array
        (
            [0] => green
            [1] => red
        )

    [1] => 4
    [0] => php
)

Note: The second parameter was added in PHP 4.0.3.

See also array_flip().

oprogramowanie magazynowe
Najtańszy fotograf lublin na ślub
kody kreskowe paskowe RFID Czytniki mobilne drukarki etykiet termina
Pozycjonowanie stron
Dostawca kas fiskalnych w Białymstoku

Another Useful functions:


zend-macro.zend-arg-array-info | zend-api.zend-get-parameters-array | zend-api.zend-get-parameters-array-ex | zend-api.zend-copy-parameters-array | zend-api.init-op-array | zend-api.destroy-op-array | zend-api.array-init | ref.array | language.types.array | language.operators.array | function.udm-alloc-agent-array | function.sybase-fetch-array | function.sqlite-fetch-array | function.sqlite-array-query | function.sesam-field-array | function.sesam-fetch-array | function.pg-fetch-array | function.odbc-fetch-array | function.oci-fetch-array | function.oci-bind-array-by-name | function.mysqli-fetch-array | function.mysql-fetch-array | function.mssql-fetch-array | function.msql-fetch-array | function.msession-set-array | function.msession-get-array | function.maxdb-fetch-array | function.iterator-to-array | function.is-array | function.ingres-fetch-array | function.in-array | function.hw-objrec2array | function.hw-array2objrec | function.httpquerystring-toarray | function.filter-var-array | function.filter-input-array | function.fbsql-fetch-array | function.db2-fetch-array | function.curl-setopt-array | function.call-user-method-array | function.call-user-func-array | function.arrayobject-offsetunset | function.arrayobject-offsetset | function.arrayobject-offsetget | function.arrayobject-offsetexists | function.arrayobject-getiterator | function.arrayobject-count | function.arrayobject-construct | function.arrayobject-append | function.arrayiterator-valid | function.arrayiterator-seek | function.arrayiterator-rewind | function.arrayiterator-next | function.arrayiterator-key | function.arrayiterator-current | function.array | function.array-walk | function.array-walk-recursive | function.array-values | function.array-unshift | function.array-unique | function.array-uintersect | function.array-uintersect-uassoc | function.array-uintersect-assoc | function.array-udiff | function.array-udiff-uassoc | function.array-udiff-assoc | function.array-sum | function.array-splice | function.array-slice | function.array-shift | function.array-search | function.array-reverse | function.array-reduce | function.array-rand | function.array-push | function.array-product | function.array-pop | function.array-pad | function.array-multisort | function.array-merge | function.array-merge-recursive | function.array-map | function.array-keys | function.array-key-exists | function.array-intersect | function.array-intersect-ukey | function.array-intersect-uassoc | function.array-intersect-key | function.array-intersect-assoc | function.array-flip | function.array-filter | function.array-fill | function.array-fill-keys | function.array-diff | function.array-diff-ukey | function.array-diff-uassoc | function.array-diff-key | function.array-diff-assoc | function.array-count-values | function.array-combine | function.array-chunk | function.array-change-key-case |


PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.