Answers for "convert two arrays into key value pair php"

PHP
0

merge two arrays one as key to another php

// two arrays one become keys and second becomes values
array_combine ( array $keys , array $values );
Posted by: Guest on November-02-2020
1

assign $variable of key value pair array to multiple variables php

$healthStructureData = [
            'product' => $product,
            'website_data' => $website_data,
            'total_keywords' => $total_keywords,
            'certificate_status' => $certificate_status,
            'total_user_websites' => $total_user_websites,
        ];

foreach ($healthStructureData as $key => $value) {
  $$key = $value;
}
Posted by: Guest on July-22-2020

Code answers related to "convert two arrays into key value pair php"

Browse Popular Code Answers by Language