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

python - Installing PyDev in eclipse is failed -

PHP OOP-based login system -

c# - Nested Internal Class with Readonly Hashtable throws Null ref exception.. on assignment -