Answers for "convert variables in associative array php"

PHP
1

php transform associative array to array

$array = array_values($array);
Posted by: Guest on June-14-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

Code answers related to "convert variables in associative array php"

Browse Popular Code Answers by Language