Answers for "php array set values"

PHP
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
3

php array

<?php
$array = array("foo", "bar", "hello", "world");
var_dump($array);
?>
Posted by: Guest on June-17-2020

Browse Popular Code Answers by Language