db->query($sql); if(!$qry) { echo "Err : " . $this->db->error()["message"]; exit; } $rows = $qry->result_array(); if (count($rows) == 0) { echo "No record for $db.inbox id : $id "; exit; } $data = $rows[0]["data"]; echo "tanggal : " . $rows[0]["tgl"] . "
\n"; echo $this->hexToString($data); } function hexToString($data) { $result = ""; $arr = explode(" ",$data); foreach($arr as $hex) { if ( trim($hex) == "" ) continue; $result = $result . chr(hexdec(trim($hex))); } return $result; } }