Answers for "php array of strings"

PHP
3

php array

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

$array

// this is a covenient way to push or crate an array and push element to it, if null  
$arr = [1, 2, 3];
$arr[] = 4; // $arr = [1,2,3,4]
Posted by: Guest on January-01-1970
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 "php array of strings"

Browse Popular Code Answers by Language