Garethp Posted July 3, 2009 Share Posted July 3, 2009 Okay, so I have an array of items which I want to split into Make and Model, with Whitespace seperating them, so I use $Str = preg_split('/\s/', $Str); But "Comedil CTL400" Won't split. Most of the other strings splits, but this one and a couple others don't. I tried using $Str = split(" ", $Str); But that didn't work either. Help please? Link to comment https://forums.phpfreaks.com/topic/164622-solved-this-string-wont-split/ Share on other sites More sharing options...
Garethp Posted July 3, 2009 Author Share Posted July 3, 2009 Hahah, sorry, turns out that Comedil CTL400 had a space or two at the end, and since I was just taking the last item, the last item was empty, giving the impression of a failed split. I fixed it now Link to comment https://forums.phpfreaks.com/topic/164622-solved-this-string-wont-split/#findComment-868199 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.