What is the potential issue with using mysql_num_rows in PHP code?

Using `mysql_num_rows` in PHP code is not recommended as it is deprecated in newer versions of PHP. It is better to use `mysqli_num_rows` or `PDOStatement::rowCount` for MySQLi or PDO respectively. This ensures compatibility with newer PHP versions and also provides better security and functionality.

// Using mysqli_num_rows to get the number of rows from a MySQLi query result
$result = mysqli_query($connection, "SELECT * FROM table");
$num_rows = mysqli_num_rows($result);
echo "Number of rows: " . $num_rows;