Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php define variables from array associative

<?php
	$array = [
		'key1' => 'foo',
  		'key2' => 'bar',
	];
	extract($array);
	
	echo $key1; //print foo
	echo $key2; //print bar
?>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #define #variables #array #associative
ADD COMMENT
Topic
Name
9+3 =