If you need to insert a comma seperated string into a variable you can accomplish this with the following code.
Let’s take a look at our string.
We can insert our string into an array by simply using the explode() function.
Now if we use the print_r() function we can view our array.
We should now see the following.