Answers for "php new array"

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
1

how to create new array in php

$array = array(
    "foo" => "bar",
    "bar" => "foo",
);
Posted by: Guest on May-10-2021
1

create array in php

$my_array = array();
Posted by: Guest on March-30-2021
0

create array php

<?php
$array = array(
    "foo" => "bar",
    "bar" => "foo",
);

// Utilisant la syntaxe de tableau courte
$array = [
    "foo" => "bar",
    "bar" => "foo",
];
?>
Posted by: Guest on August-30-2021

Browse Popular Code Answers by Language