<?php $json = '[{ "id": 1, "de": "German text", "en": "English text", "name": "question" }, { "id": 2, "de": "German text", "en": "English text", "name": "error" }, { "id": 3, "de": "German text", "en": "English text", "name": "success" }]'; $dbTexts = json_decode($json, true); foreach ($dbTexts as $text) { $texts[$text['name']] = $text['de']; } print_r($texts);
You have javascript disabled. You will not be able to edit any code.