Change keys value in foreach PHP -


it possible change "keys" values in foreach php? example have database this:

http://i.imgur.com/fjawqgx.png

and want data, , display in:

foreach ($array $key => $value) { ...  } 

how can change "keys" if don't want display, example "u_group" "group"?

ps. sorry bad english ^ ^"

create language array, keys $key , value proper text.

e.g:

$langs = ['u_group' => 'group', 'u_other' => 'other']; foreach ($array $key => $value) {     echo 'user ' . $langs[$key] . ': ' . $value; } 

Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -