reverse

Reverse a String, Number, or Array.


Syntax


Parameters

  • Mixed subject - The entity to reverse.
    • String - The String will be reversed.
    • Number - The Number will be treated as a String.
    • Array - The sequence of items in the Array will be reversed.
  • Boolean preserve - The optional preserve parameter only has any effect if subject is an Array.
    • false (default) - The keys in the Array returned will be re-assigned from 0.
    • true - The original keys will be retained.


Result

  • Mixed - The reversed subject.
    • String - If subject is a String or Number.
    • Array - If subject is an Array.

Returns subject with its elements in reverse order.

ptpscript/functions/reverse.txt · Last modified: 2007/01/24 10:15
 
 
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki