Jump to content

Array troule grr


George Botley

Recommended Posts

Here's the array structure:

 

  Array ( [0] => Array ( [0] => name=Ecommerce Management [1] => nextduedate=2012-05-11 [2] => status=Active ) [1] => Array ( [0] => name=Page Management [1] => nextduedate=2012-05-11 [2] => status=Active ) ) 11                        

 

I would like it to be like this:

 

$addon["0"]["name"] = Ecommerce Management

$addon["0"]["nextduedate"] = 2012-05-11

$addon["0"]["status"] = Active

 

You get the idea...

 

Here's my code so far...

 

//Check License Addons
    function license_addons($addons) {
        
        //Addons are passed in a callback seperated by a vertical seperator - | - so lets explode the addons value
        $addons = explode("|", $addons);
        
        //Let's pass through each child array and explode its values. The new delimited value is ";".
        foreach($addons as $key=>$value) { 
        
            //Explode the child arrays at the delimited value ";"
            $addons[$key] = explode(";", $value); 
            
        }

        
    }

 

Any ideas??

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.