Re: ArrayPath

From: Date: Tue, 07 Oct 2014 17:15:56 +0000
Subject: Re: ArrayPath
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-77810@lists.php.net to get a copy of this message
On Tue, 2014-10-07 at 17:05 +0100, Mathias Grimm wrote: > Hi, > I would like to suggest something for php like a class I am using > > https://github.com/mathiasgrimm/arraypath > > The reason is to access arrays like this: > > $idx3 = ArrayPath::get('idx1/idx2/idx3', $_POST, 'myDefaultValue'); what hppens if my array has a / as part of the key? Do I have to check that beforehand and set a custom identifier? So what happens if I use your example with $_GET instead of $_POST and a user requests foo.php?idx1=idx2/idx3 I'm not really convinced. johannes

« previous php.internals (#77810) next »