Created
April 3, 2013 06:33
-
-
Save narita1980/5298911 to your computer and use it in GitHub Desktop.
[備忘録]preg_match_allの使用例
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
preg_match_all('/hoge/', 'This is a test.', $matches); | |
foreach($matches as $val) { | |
echo "result: " . $val[0] . "\n"; | |
} | |
/***** | |
Output: | |
result: | |
*****/ | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment