php - Separate the words of a text by a special character " , " -


this question has answer here:

i have question

i text input[type="text"] this:

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

i received string value looks this:

$tags = $_post['tags']; $tags = "car,bmw,speed,fast"; 

i need separate words "," , add $arr :

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

how can !?

thanks

use "explode" function present in php. below

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

Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -