Hi!
Maybe more of a kind php - question but i hope someone can help me anyway.
In my function i return an array, i can loop and thats working.
That gives me:
Layout: John
Strategy: John
Management: Martin
so if the same person has more than one 'jobs' (like John)
how can i get:
Layout and Strategy: John // or Layout, Strategy and someOtherJob: John // semiclone + 'and' before last
Management: Martin
//$InfoFieldArray = array('Layout' => 'John', 'Strategy' => 'John', 'Management' => 'Martin');
public function createInfoFields($InfoFieldArray){
$Info = ArrayList::create();
foreach($InfoFieldArray as $key => $value ){
$fields = new ArrayData(array('FieldName' => $key, 'Value' => $value));
$Info->push($fields);
}
return $Info;
}
Hope you can help.
thanks.timo