<? $test = "Whatever you do, don't panic!"; if ( preg_match( "/(don't)\s+(panic)/", $test, $array ) ) { print "<pre>\n"; print_r( $array ); print "</pre>\n"; } ?>