March 2002
Intermediate to advanced
528 pages
21h 29m
English
sscanf
mixed sscanf(stringstring, stringformat[, mixedvariable1...])
Parses string for values of types given in
format; the values found are either
returned in an array or, if variable1
through variableN (which must be variables
passed by reference) are given, in those variables.
The format string is the same as that used
in sprintf( ). For example:
$name = sscanf("Name: k.tatroe", "Name: %s"); // $name has "k.tatroe"
list($month, $day, $year) = sscanf("June 30, 2001", "%s %d, %d");
$count = sscanf("June 30, 2001", "%s %d, %d", &$month, &$day, &$year);