Skip to content

Instantly share code, notes, and snippets.

@mreishus
Created November 14, 2013 22:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mreishus/7475460 to your computer and use it in GitHub Desktop.
Save mreishus/7475460 to your computer and use it in GitHub Desktop.
Set::extract
# =============== CODE =========================
$data = array(
'EventPresenter' => array(
0 => 1000,
'corp_id' => 2000,
),
);
$corp_id = Set::extract($data, "/EventPresenter/corp_id");
pr(compact('corp_id'));
# ================ OUTPUT ======================
[corp_id] => Array
(
[0] => 1000
[1] => 2000
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment