PHP array_reverse() Function
Complete PHP Array Reference
Definition and Usage
The array_reverse() function returns an array in the reverse order.
Syntax
array_reverse(array,preserve)
|
Parameter |
Description |
array |
Required. Specifies an array |
preserve |
Optional. Possible values:
Specifies if the function should preserve the array's keys or not. |
Example
<?php
$a=array("a"=>"Dog","b"=>"Cat","c"=>"Horse");
print_r(array_reverse($a));
?>
|
The output of the code above will be:
Array ( [c] => Horse [b] => Cat [a] => Dog )
|
Complete PHP Array Reference
Whether you're new to XML or already an advanced user, the user-friendly views
and powerful entry helpers, wizards, and debuggers in XMLSpy are designed to
meet your XML and Web services development needs from start to finish.
- XML editor
- Graphical XML Schema / DTD editors
- XSLT 1.0/2.0 editor, debugger, profiler
- XQuery editor, debugger, profiler
- Support for Office Open XML (OOXML)
- Graphical WSDL editor & SOAP debugger
- Java, C#, C++ code generation
- And much more!
Download a fully functional free 30-day trial today!
|