Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php add to associative array

// for php 5.4+
$data += [$key => $value];

// for php 5.4-
$data += array($key => $value);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #add #associative #array
ADD COMMENT
Topic
Name
2+9 =