how to use cakephp 3 for text and value fields?

The form helper will use the array keys as the option element values, so you fix the problem by passing an array where the keys have the values that you desire.

For example use array_combine() to create a new array using the existing array’s values as keys:

$words = array_combine($words, $words);

See also

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top