PHP M Modifier To Change Behavior Of $ – String Function

 
    <?$text = "Name: matt\noccupation: coder\neyes: blue\n";
preg_match_all( "/^\w+:\s+(.*)$/m", $text, $array );foreach ( $array[1] as $val ) {
    print "$val<br />";
}
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.