sscanf() not returning info

From: Date: Sat, 27 Aug 2005 17:49:53 +0000
Subject: sscanf() not returning info
Groups: php.general 
Request: Send a blank email to php-general+get-221471@lists.php.net to get a copy of this message
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

« previous php.general (#221471) next »