<?php $names = ["barira, stefan", "cikka, maria", "luppo, martin ", "bill, sebastian"]; $result = preg_replace('/(\w+),\s+(\w+)/', '$2, $1', $names); print_r($result);
You have javascript disabled. You will not be able to edit any code.