Вот мой код:
Код: Выделить всё
$excelData = array(
$users->name,
$users->first_name . ' ' . $organization->last_name,
$users->user_email,
date('d M y', $timestamp),
if ($users->amount == NULL) {
echo 0;
} else {
$users->amount;
},
if ($users->coupon_code == NUll) {
echo "No Coupon Code";
} else {
$users->coupon_code;
},
);
Подробнее здесь: https://stackoverflow.com/questions/631 ... al-to-null
Мобильная версия