Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php initialize two dimensional array dynamically

$array_ = [];

foreach ($queryresult as $row){
   $array_[] = [$row['id'], $row['title']];
}  

var_dump($array_);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #initialize #dimensional #array #dynamically
ADD COMMENT
Topic
Name
1+4 =