I am half way done and struck at imploding on the output.
I have a string as
$text = "test | (3), new | (1), hello | (5)";
$text = explode(",", $text);
foreach ($text as $t){
$tt = explode(" | ", $t);
print_r($tt[0]);
}
When I print the above array, it gives me test new hello
as needed, now, I need to put a comma like this test, new, hello
I searched and could not achieve hence posting here to get help.