這個$matches是怎么來的?
$subject = "my email is [email protected]";
$pattern = '/[\w\-]+@\w+\.\w+/';
preg_match($pattern, $subject, $matches);
echo $matches[0];
這個$matches是怎么來的?
$subject = "my email is [email protected]";
$pattern = '/[\w\-]+@\w+\.\w+/';
preg_match($pattern, $subject, $matches);
echo $matches[0];
這個$matches是怎么來的?
2014-11-11
舉報
2014-11-17
建議你下載一下這個課程源碼下載區的《PHP學習手冊》,查找一下preg_match這個函數的使用方法,你自然而然就知道$matches是怎么來的了,祝學習愉快^_^!