Re: Function return

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/2/07, Dan Shirah <mrsquash2@xxxxxxxxx> wrote:
>
> Okay, so instead I should probably use:
>
> if($due_date != "")
> $insert2.=", due_date='$due_date'";
>
> Instead of using empty()
>

using emtpy is fine; just store the results of trim in a temporary variable:

$trimmed = trim($due_date);
if(!empty($trimmed)) {

 $insert2 .= ", due_date='$due_date'";

}

-nathan

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux