String together multiple variables and seperate with commas
Posted on 2011-10-04
I have 6 variables:
Each of these variables can be equal to a fax number (5555551212) OR can be null (0000000000). The numbers need to be passed to a new variables called $faxnumbers. $faxnumbers is equal to all of the numbers seperated by commas -
$faxnumbers = "$faxnumber,$faxnumber2,$faxnumber3,$faxnumber4,$faxnumber5,$faxnumber6";
I no longer want to include the variable if it is equal to 0000000000. So... I need to remove the variable from the above string if equal to 0000000000, BUT I also need to remove the , that seperates it.