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
https://forums.phpfreaks.com/topic/262424-array-troule-grr/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.