Re: alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma'
| From: | דניאל דנון | Date: | Sun, 07 Jun 2009 11:56:46 +0000 |
| Subject: | Re: alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma' | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-293699@lists.php.net to get a copy of this message | ||
problem is number of "/" is unknown.
It can be alpha/beta
alpha/beta/gamma
alpha/beta/gamma/delta
...
(here's a copy to the nice list =] )
On Sun, Jun 7, 2009 at 2:53 PM, Nitsan Bin-Nun<nitsanbn@gmail.com> wrote:
> 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: Ž<Ÿwƒ
>> >> d¯'S„ãachttp://www.php.net/unsub.php
>> >>
>> >>
>> >
>>
>>
>>
>> --
>> Use ROT26 for best security
>
>
--
Use ROT26 for best security