Answers for "array element php"

PHP
2

array values php

<?php
  
$array = array("size" => "XL", "color" => "gold");

print_r(array_values($array));

?>
Posted by: Guest on June-01-2020
3

php array

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

php define variables from array associative

<?php
	$array = [
		'key1' => 'foo',
  		'key2' => 'bar',
	];
	extract($array);
	
	echo $key1; //print foo
	echo $key2; //print bar
?>
Posted by: Guest on September-07-2020

Browse Popular Code Answers by Language