<?php $a = ['red', 'green', 'blue']; $choices = []; foreach ($a as $e) { $choices[$e] = $e; } var_dump($choices); var_dump(array_combine($a, $a));
You have javascript disabled. You will not be able to edit any code.