If I want to modify a comma separated list like this:
$foo = "2, 4, 33, 25, 66"
to become
$foo = "'1-2', '1-4', '1-33', '1-25', '1-66'"
What would be the fastest and most efficient way to achieve that in PHP?
EDIT: I have tried this, but looking for a better way:
$foo = "2, 4, 33, 25, 66";
$bar = implode("', '1-",explode(",",$foo));
$foo = "'1-". $bar ."'";