Skip to content

Instantly share code, notes, and snippets.

@narita1980
Created April 3, 2013 06:33
Show Gist options
  • Save narita1980/5298911 to your computer and use it in GitHub Desktop.
Save narita1980/5298911 to your computer and use it in GitHub Desktop.
[備忘録]preg_match_allの使用例
<?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