<?php
require("includes/check_auth_user.php");
require("includes/dbconnect.php");
include ('includes/function.php');
$outputCSv = "";
$someData = array(
    array('one' ,'two' ,'three'),
    array('واحد', 'اثنان', 'ثلاثة'),
    array ('اربعة', 'خمسة', 'ستة'),
    array('سبعة', 'ثمانية', 'تسعة'),
);

foreach ($someData as $data) {
    $outputCSv .= implode(',', $data) . "\r\n";
}
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename=csvTest.csv');
print chr(255) . chr(254).mb_convert_encoding($outputCSv, 'UTF-16LE', 'UTF-8');

?>