I'm trying to use preg_split to split this text
Yes, it was great. [I have no ideas how great it was.]
into this array:
['Yes', 'it', 'was', great', '[I have no ideas how great it was.]'
But I don't know how...
I'm trying to use preg_split to split this text
Yes, it was great. [I have no ideas how great it was.]
into this array:
['Yes', 'it', 'was', great', '[I have no ideas how great it was.]'
But I don't know how...
$keywords = preg_split("/[\s,.]+(?![^[]*])/", "Yes, it was great. [I have no ideas how great it was.]");
print_r($keywords);