Re: alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> 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@xxxxxxxxx> wrote:
> > I think that he is talking about uri rewriting :O
> >
> > On Sun, Jun 7, 2009 at 2:04 PM, Angus Mann <angusmann@xxxxxxxxx> wrote:
> >
> >> ??? Huh  ???
> >>
> >>
> >> ----- Original Message ----- From: "דניאל דנון" <danondaniel@xxxxxxxxx>
> >> To: "PHP General List" <php-general@xxxxxxxxxxxxx>
> >> Sent: Sunday, June 07, 2009 8:11 PM
> >> Subject:  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
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux