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

adding up might be solved tell us cheers.
i think i finally solved this anybody.

last time i was getting the wrong results.

Code

PHP Code / Script To check weather the given email exists in a domain
Hi,

I want to implement the following in my web page

in sign up we will ask to enter u

Problem with a select distinct
I have a problema with a select distinct, I have the next sql:

select distinct a,b,c,d fr

Website Direction...
I recently used this code to try and make it so the page loads as http://www.domain.com/ when you ty

what business processes?
Hi,

A general question. What business processes (like OTC - Order to Cach, P2P, R2R etc)

rdns with php
I am trying to build a script that will show all of the different domains that are hosted on the sam

Bandwidth monitoring?
Hi guys,

I need a little information I have written a php app and I occurred to that I need

Login Script Issues
I am using a script I got from http://phpsense.com/php/php-login-script.html in order to allow peopl

Calculating a rating by adding number of points and dividing by number of items
I have a site that users can post links to files to download. They can rate these files on a 1-5 sca

Switch letters in message (basic cryptology)...
I am trying to switch letters around in a message for an application on my site (see here). The prob

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