https://github.com/adrian-ortega/dot-notation-php
https://github.com/adrian-ortega/dot-notation-php
dot-notation
Last synced: 15 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/adrian-ortega/dot-notation-php
- Owner: adrian-ortega
- Created: 2016-07-23T04:19:44.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-02-25T23:06:56.000Z (almost 8 years ago)
- Last Synced: 2025-05-10T05:20:57.604Z (9 months ago)
- Topics: dot-notation
- Language: PHP
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple Dot Notation with PHP
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