Dalam pembuatan laporan excel, angka menampilkan 7.70225E + 11 tetapi seharusnya ditampilkan seperti 770225145579. Siapa pun tolong bantu untuk mengatasi masalah ini. Kode saya adalah,
<?php
include("connection.php");
if(isset($_POST['submit']) && $_POST['submit']=="Download")
{
$payor_code = $_POST['payor_code'];
$corp_code= $_POST['corp_code'];
$pro_type = isset($_POST['product_type']);
$submit_date = $_POST['sub_date'];
$sql= oci_parse($conn, "select * from members ");
oci_execute($sql);
$dat = date("d/m/Y");
$filename = "Report_$dat";
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=export.csv");
header("Pragma: no-cache");
header("Expires: 0");
$header = array(
"ReceivedDate",
"SubmissionDate",
"PatientName",
"PatientIC",
"PrincipalName",
"PrincipalIC",
"ClaimNo"
);
$fp = fopen('php://output', 'w');
fputcsv($fp, $header);
//$incr = 0;
while($row = oci_fetch_array($sql)) {
$name = $row['RECEIVED_DATE'];
$email = $row['SUBMISSION_DATE'];
$mobile = $row['PATIENT_NAME'];
$address = $row['NRIC_ID'];
$city = $row['PRINCIPAL_NAME'];
$state = $row['PRINCIPAL_NRIC'];
$pincode = $row['CLAIMS_ID'];
$fields = array ($name, $email, $mobile, $address,$city,$state,$pincode);
fputcsv($fp, $fields);
}
}
?>
Tolong selesaikan masalah ini. Saya harus mendapatkan output yang tepat setelah saya mengunduh laporan excel. Saya tidak ingin melakukan perubahan manual.