Snippets tagged “preg-match-all”
2 snippets use this tag.
- Get the first letter of each word in a stringPHP
You can use the preg_match_all function in PHP to match all the words in a string and then use the substr function to get the first letter of each word.
- PHP/regex: How to get the string value of HTML tag?PHP
In PHP, you can use the preg_match() function to extract the string value of an HTML tag.