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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to