I have the input array in following format:
"123,46,78,000";
But I need it in this format:
'123','46','78','000';
can any one help me?
Let's devide this string into the array.
$var = "123,46,78,000";
$array = explode(',',$var);
after that we can merge all array into string using implode function.
$finaloutput = "'" . implode ( "', '", $array ) . "'";
echo $finaloutput;
now, you will get the exact output which you need.
I hope this will solve your problem.
Thanks,