.i want to display mysql database rows via ajax and json.but values is displaying "UNDEFINED". i know the problem is from ajax.html. any help please.

ajax.html
Code:
<script>
$(document).ready(function() {
//$("#ajaxButton").click(function() {



$.ajax({
     type: "post",




     url: "rowcount.php",
     success: function(data) {
var obj = $.parseJSON(data);      
var result = "<ul>"
   $.each(obj, function() {
result = result + "<li><b><font size=5>your rowcount is</font> <font color=green size=5> " + this['row'] +  "</font></b></li>";
   });
result = result + "</ul>"
$("#result").html(result);
 }
}); 


//});



});

</script>
<div id="result"></div>

rowcount.php

Code:
<?php


require('db.php');



$result = $db->prepare('SELECT * FROM users
');
$result->execute(array());

$rows = array();
  //while ($r = $result->fetch()) {
  //$rows[] = $r;
//}




$r = $result->rowCount();
  $rows[] = $r;


echo json_encode($rows);

?>