Skip to main content

rgar()

function rgar( $array, $prop, $default=null )

Get a specific property of an array without needing to check if that property exists.

Provide a default value if you want to return a specific value if the property is not set.

Since: Unknown

Source: gravityforms.php:7084

Parameters

NameTypeDefaultDescription
$arrayarrayArray from which the property's value should be retrieved.
$propstringName of the property to be retrieved.
$defaultstringnullOptional. Value that should be returned if the property is not set or empty. Defaults to null.

Returns

  • null | string | mixed — The value