Using preg_filter to add a suffix ("_suffix") to each item in the array. Use this one-liner to for good performance and easy solution. There are other solutions, but this is the preferred one.
Source code viewer
// Original array // Use preg_filter to add the suffix $suffixed_array = preg_filter('/$/', '_suffix', $array); // Display the modified arrayProgramming Language: PHP