php function

kimwong99956

New Member
Messages
5
Reaction score
0
Points
0
if I have an array like this $a1 = array('first'=>'one','second'=>'two, 'third'=>'three');

I want to produce from $a1 this array

$a2 = array('The key is first and the value is one', 'the key is second and the value is two', 'the key is third and the value is three');

is this possible using EXISTING php functions? I know I can write my own function to do this, and it's quite simple, but before I do that I want to first make sure that there aren't any php functions that can already do this.

thanks

Kim
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
No, there is no natural_language_serialize($array_name, "english") -- you'll need to use a foreach like everybody else.
 
Top