Web lists-archives.com

[PHP] Multi dimensional array




How do I correctly make "category_assignment" into a multi dimensional array:

if(is_array($result) &&count($result) >'0') {
    foreach($resultAS$value) {
        $array= [
            'reference'=>$value['reference'],
            'introductory_paragraph'=>$value['introductoryParagraph'],
            'category_assignment'=>array[][$value['category'] =>$value['categoryLink'] ]
        ];
    }
}

Ron