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:

Did you know?Explore Trending and Topic pages for more stories 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

Just a white page
Okay so, my website, when I click SignUp on it it takes me to /join.php but its a complete white pag

Default TimeZone
The server I'm working with is hosted in America so all times inserted into the database are coming

Hyperlink is adding an extra gap to variable
Hi, here's my problem..

I have a php generated page with a hyperlink which opens in a new win

Add User script "Could not execute query"
This should be an easy script but I can't get it to run. Can someone please help me?

<

how to hide input fields on selection screen using variant attribute
Hello all,

I want to know how to hide input fields on selection screen using variant attr

how can i make a .gif images for my site
Dear Friends ,

Pls solve my problem , I am starting making new site but i dont know how can i

Are sessions secure at all?..
I haven't really gotten into yet, but I was just thinking of something weird..

Lets say you h

PHP error on MySQL insert
I'm sure it's the simplest of issues, but I can't recall why this isn't working.

Code: [Selec

Shuffle between users ??
I have multiple $users in table. I need to send them $message.

I need to send the next messag

Syntax error
hi im having a little trobble with this script
-------------------------------------------------

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