Hi all:
New with PHP and may in a bit over my head.
I am posting 5 variables to a page. Some of these variables may be NULL. I want to set up an array including only those variables that are not NULL and use that array to send out emails. So if 3 of the variables are not NULL 3 different emeials will go out.
I am having trouble understanding how to dynamically fill the array just with non-NULL variables. I am trying the following but I am sure this is incorrect. Any help appreciated.
array(
if ($idate1 != NULL){
$idate1.",";
}
if ($idate2 != NULL){
$idate2.",";
}
if ($idate3 != NULL){
$idate3.",";
}
if ($idate4 != NULL){
$idate4.",";
}
if ($idate5 != NULL){
$idate5;
}
)