1

I have php prinf and doesn't work with <li type="1">. It works only with chrome browser, what can i do to make it work with all browsers?

My php code is very long and ill provide shorter version:

sample code is like this:

<ul>
<table>
$result = mysql_query("........",$db);

if(mysql_num_rows($result) > 0)
{
    $myrow = mysql_fetch_array($result);
do
{
    printf ("

<tr><td><li type="1">%s</li></td></tr>",$myrow["var"]);
}
while ($myrow = mysql_fetch_array($result));    
}
else
{
    echo "<p align='center'>error...</p>";
}

</table></ul>

here is screenshot

Lasha
  • 467
  • 1
  • 4
  • 14
  • your `printf` is missing a closing double quote, fix the syntax – Édouard Lopez Sep 08 '13 at 14:51
  • **Warning:** mysql extension is [deprecated](http://stackoverflow.com/questions/13944956) as of PHP 5.5.0, and will be removed in the future. Instead, the [MySQLi](http://www.php.net/manual/en/book.mysqli.php) or [PDO_MySQL](http://www.php.net/manual/en/ref.pdo-mysql.php) extension should be used. Please don't use `mysql_*` to develop new code. – bansi Sep 08 '13 at 14:53
  • define `doesn't works` and there are no `
  • ` tag in your sample. Create a [gist](http://gist.github.com/) then link it in your description
  • – Édouard Lopez Sep 08 '13 at 14:54
  • missed closing quotes on printf and the quotes around `1` is not quoted. – bansi Sep 08 '13 at 14:55
  • your tag order is also messed up `` is not a valid tag inside `
      `
    – bansi Sep 08 '13 at 14:57
  • If the sample code is not formatted the same as the real code, we can't see the problem. THIS code should result in zero output because of the quote mark errors. If the real code does output something, then it _doesn't_ look like this, and you're asking us to look at the wrong problem. –  Sep 08 '13 at 14:58
  • should i provide real code? it is very long – Lasha Sep 08 '13 at 15:00
  • okey i just want to count names with ul li in printf... is there any way? – Lasha Sep 08 '13 at 15:33