Re: alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma'
| From: | Nitsan Bin-Nun | Date: | Sun, 07 Jun 2009 11:53:26 +0000 |
| Subject: | Re: alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma' | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-293698@lists.php.net to get a copy of this message | ||
Don't forget to send a copy to the list ;)
Regarding your function, I'm writing it right now, it would probably have
some issues but I think that it would work:
function somefunction($v)
{
preg_match("#^([^/]+)/([^/]+)/(.+)$#", $v, $m);
return array($m[1] => array($m[2] => $m[3]));
}
HTH,
Nitsan
On Sun, Jun 7, 2009 at 2:36 PM, דניאל דנון <danondaniel@gmail.com> wrote:
> its related to that but I'm building a kind of "supposed" urls for
> certain things... Its complicated to explain,
> But I need to turn
> print_r($var); // alpha/beta/gamma
>
> $var = somefunction($var);
>
> print_r($var); // array("alpha" => array("beta" =>
> "gamma"))
>
>
> On Sun, Jun 7, 2009 at 2:33 PM, Nitsan Bin-Nun<nitsanbn@gmail.com> wrote:
> > I think that he is talking about uri rewriting :O
> >
> > On Sun, Jun 7, 2009 at 2:04 PM, Angus Mann <angusmann@pobox.com> wrote:
> >
> >> ??? Huh ???
> >>
> >>
> >> ----- Original Message ----- From: "דניאל דנון"
> >> <danondaniel@gmail.com>
> >> To: "PHP General List" <php-general@lists.php.net>
> >> Sent: Sunday, June 07, 2009 8:11 PM
> >> Subject: [PHP] alpha/beta/gamma TO $var['alpha']['beta'] =
> >> 'gamma'
> >>
> >>
> >>
> >> I have encountered a problem when trying to turn
> >>>
> >>> --
> >>> Use ROT26 for best security
> >>>
> >>>
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> >
>
>
>
> --
> Use ROT26 for best security
>