Posted by Simon Fredriksson on 08/27/05 20:49
Can anyone tell me what is wrong here?
<?php
$data = "<a class=\"new20030101\" href=\"Zero01.jpg\">Pic 1</a>";
$info = sscanf($data,"<a class=\"%s\" href=\"%s\">%s</a>");
var_dump($info);
?>
Returns:
array(3) {
[0]=>
string(12) "new20030101""
[1]=>
NULL
[2]=>
NULL
}
I expect:
array(3) {
[0]=>
string(11) "new20030101"
[1]=>
string(10) "Zero01.jpg"
[2]=>
string(5) "Pic 1"
}
//Simon
[Back to original message]
|