 |
php - how can I add key value pairs to an array? - Stack Overflow
You can create the single value array key-value as $new_row = array($row["datasource_id"]=>$row["title"]); inside while loop, and then use array_merge function in loop to combine the each new $new_row array.
stackoverflow.com |
 |