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

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

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