This code will display city if avaialable
<?php
$getCityQuery = mysql_query("SELECT city FROM tbl_city_master WHERE id = ".$rs->city."");
if ($getCityQuery)
$resultSetCityQuery = mysql_fetch_assoc($getCityQuery);
?>
<?php
if (resultSetCityQuery != null)
echo "<strong>City-</strong>$resultSetCityQuery['city']";
?>
4
solved If else condition in php [closed]