<? php
include_once( "conif.php");
//$uid = isset ( $_GET[ 'uid ']) ? mysql_escape_string( $_GET[ 'uid ']) : "";
$uid = 1;
mysql_query ("set character_set_results='utf8'"); // set names mysql query
$qur = mysql_query( "select name, address from gujrati_data where id ='$uid'");
$result = array( );
// echo $r[ 'name'];
//echo $r[ 'address'];
$result[ ] = array( "name" => $name,"email" => $address);
}
$json = array( "status" => 1, "info" => $result);
$json = array( "status" => 0, "msg " => "User ID is Not Define ");
}
@mysql_close( $conn);
//echo json_encode( $json);
// add this JSON_UNESCAPED_UNICODE in json output
?>
Step 1)
Change database field Structure
mysql_query ("set character_set_results='utf8'"); set this
If you want this in html then you can use <? php header ('Content-type: text/html; charset=utf-8'); ?> also you can use
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
0 komentar:
Post a Comment