note 83479 deleted from function.sscanf by googleguy
| From: | googleguy@php.net | Date: | Tue, 22 Oct 2013 11:00:36 +0000 |
| Subject: | note 83479 deleted from function.sscanf by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-197009@lists.php.net to get a copy of this message | ||
Note Submitter: --==[FReeZ]==--
----
sscanf() in PHP also supports the more advanced patterns like in C++.
That means you can use it a lot more, after readining the details from http://www.cplusplus.com/reference/clibrary/cstdio/sscanf.html
Example usage:
$date = 'january-2008';
sscanf($date, '%[a-z]-%d', $month, $year);
printf('Parsed values: "%s", "%d"', $month, $year);
// Outputs Parsed values: "january", "2008"