Generate multilayered array from string.


Posted on 16th Feb 2014 07:03 pm by admin

ok so i have a string that looks like this:
Code: [Select]blog:edit_all,delete_all|users:edit_all,delete_all|settings
and i want to make a code that can take that string and put it in a multi-layered array like this:

Code: [Select]Array
(
[0] => blog
(
[0] => edit_all
[1] => delete_all
)

[1] => users
(
[0] => edit_all
[1] => delete_all
)

[2] => settings
)

i've googled and everything and cant seem to get anything to work. ive come close but not quite.

any ideas?
thank you.

No comments posted yet

Your Answer:

Login to answer
125 Like 14 Dislike
Previous forums Next forums
Other forums

Unifying logins of two different scripts
I have two different game scripts which I want to embed on my own site. The problem is I don't want

PHP loop
Okay so I have several "articles" stored in a mysql database and am attempting to echo tho

asking for direction
I have 2 tables in my data, which are "post" and "event"
I won't make a summa

quick basic question, hopefully not dumb
I don't know how to search for this, so forgive me if it's been covered...

I often see an exa

Simple Question
I know this is a simple question, that if I knew what it was technically called i could probably loo

Export hangs
Hi all, please help

I have a Oracle 10.2.0.3.0 database. When I want to query the dba_segmen

PHP & Images [Resize, Crop, Save]
Hey! Well I have a little dilema, hoping I could find some guidance.

I have a CMS and on the

Using real time in php
I'm very average at PHP and im looking to introduce time to something on my site.
Its a sports si

Multi image upload
I have a gallery to build and want to build a dynamic upload form to allow for $var number of fields

am I using this for loop correctly
Dear buddies!

Right now I am generating a report with some details for all the dealers.

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash