![]() ![]() arr explode ( del 0, strreplace (del, del 0, str) ) Share Improve this answer Follow edited at 20:19 answered at 20:36 65Fbef05 4,482 1 22 24 That should be faster than regexs, nice one. If you are looking for a simpler multi-explode that returns a flat array, use a regular expression to standardize all delimiters before exploding. Use mbstrsplit() to split the string into code points. 6 Answers Sorted by: 58 str 'Monsters are SUPER scary, bro' del array ('a', 'b', 'c') // In one fell swoop. trying to solve the delimiter problem with multiple calls to explode(). I did the following $no_of_packets=substr_count($packets, '*') Means every packet start with * and end with # ![]() Here in the code below, we are separating the multiple values of the textbox with a comma. I need to split multiple data packets to single chunk $packets=" ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |