Skip to main content

set_array_value()

public static function set_array_value( $source_array, $array_path_keys, $value )

Sets a new value on an existing array, given a known path.

Since: 2.5

Source: common.php:7809

Parameters

NameTypeDefaultDescription
$source_arrayarrayAn array with data that requires updating.
$array_path_keysarrayAn indexed array containing the path to update on the $source_array.
$valuemixedThe new value to set on the $source_array.