Q:

Using mysql MAX() with PHP fetching data from database

I have some problems here. 
I tried fetching a data from column(which datatype is float) with the highest number and displays it.  But it only shows the count of row(which is 1)
how to I get the exact 'Number' that I need? 
PHP
   <? php
    $sql= mysqli_query($con, "SELECT MAX(payment_price) FROM client_record WHERE payment_status ='Settled'");
    $row = (int)mysqli_fetch_array($sql);
    echo $row;

   ? >

What it shows:
 1

What I need to see:
 //the exact price that MAX() fetched
 20,000

A:

As function you use, has a name mysqli_fetch_array, this means that result of this function is array.  Casting array type to int type doesn't do what you expect. 
Instead, what you need to use is just: 
$row = mysqli_fetch_array($sql);
print_r($row);
// what you need is something like
echo $row['MAX(payment_price)'];

A:

Try the following:
<? php
$sql= mysqli_query($con, "SELECT MAX(payment_price) as max FROM client_record WHERE payment_status ='Settled'");
$row = mysqli_fetch_array($sql);
echo $row['max'];

When you convert an array into an int it only converts it as a boolean value.  Not the value of the array.  So, use the index 'max' to get the value you want, as you can see I edited the MySql query to add as max it will provide the value for 'max'.