There are many answers on this problem, but i found one very easy to implement, lightweight, and fast.
I think the fewer code lines, the better, so why not using a regexp instead of substr?
Showing posts with label php substr word safe. Show all posts
Showing posts with label php substr word safe. Show all posts
Thursday, July 19, 2012
Substract a string on a word boundry using regexp
Etichete:
pcre,
php,
php regex,
php substr word safe,
regular expressions,
regular expressions in php
Subscribe to:
Posts (Atom)