adrian-ortega/dot-notation-php

Access array data with dot notation

0.0.0 2018-02-25 22:30 UTC

This package is not auto-updated.

Last update: 2024-04-13 17:29:54 UTC


README

Access array data with dot notation.

Usage

$data = [
	'first_name' => 'John',
	'title' => 'Doe',
	'company' => 'ACME',
	'age' => 36,
	'address' => [
		'street' => '123 Anywhere Street',
		'city' => 'Los Angeles',
		'state' => 'CA',
		'zip_code' => 90210
	]
];

$street = DotNotation::parse('address.street', $data);

// outputs 123 Anywhere Street
echo $street