How do I apply a string function to an array?
- by ggg
I was fortunate enough to receive this code (flips Lastname, Firstname) from an earlier post.
$name = "Lastname, Firstname";
$names = explode(", ", $name);
$name = $names[1] . " " . $names[0];
How do I apply the function to each value in an array that is in the form: $ginfo ->$(LastName, FirstName).
I tried the code below, but it doesn't…