sscanf() not returning info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux