用特殊字符分隔文本的单词“,”[复制]

I have a question

I get a text by input[type="text"] look like this:

<input type="text" name="tags"/>

I received an string value that looks like this:

$tags = $_POST['tags'];
$tags = "car,BMW,speed,fast";

I need Separate the words by "," and add to $arr look like this :

$tag_arr = ['car','BMW','speed','fast'];

How can I do it !?

Thanks

</div>

Use "explode" function present in php. Like below

$tags = explode(",","car,BMW,speed,fast");