Skip to content

Latest commit

 

History

History
81 lines (48 loc) · 1.17 KB

Ary.md

File metadata and controls

81 lines (48 loc) · 1.17 KB

JW3B\Helpful\Ary

Methods

Name Description
arrayToObject Convert an array to an object.
flop_vals Preserving the keys and flop the values in reverse order.
objectToArray Convert an object to an array.

Ary::arrayToObject

Description

public static arrayToObject (mixed $d)

Convert an array to an object.

Parameters

  • (mixed) $d : The array to convert. Return Values

object

The converted object.


Ary::flop_vals

Description

public static flop_vals (array $ary)

Preserving the keys and flop the values in reverse order.

Parameters

  • (array) $ary : Array Return Values

array

The new array.


Ary::objectToArray

Description

public static objectToArray (mixed $d)

Convert an object to an array. ? credits to
! https://www.if-not-true-then-false.com/2009/php-tip-convert-stdclass-object-to-multidimensional-array-and-convert-multidimensional-array-to-stdclass-object/ Parameters

  • (mixed) $d : The object to convert. Return Values

mixed

The converted array.