[thelist] is_null php

Tom Dell'Aringa pixelmech at yahoo.com
Tue Jul 29 20:50:16 CDT 2003


--- rudy <rudy937 at rogers.com> wrote:
> you mean the other way around?  when it's null, print something?

No, I have an start date and an end date. If the end date is present
(not null) then I want to print something like

july 22 to july 23

but if end date is null

july 22

> tom, why don't you just return the result as a string, if all you
> want is to print it?

I've already printed out the first date (july 22). 

Here's what I have. I'm using Simons way (let's just go with that for
now so I don't have to redo all my code!) to do the date. So I have:

select...UNIX_TIMESTAMP(eventEnd) as unixtimeEnd

// row results
$unixTimeEnd = $queryResult["unixtimeEnd"];
$eDateEnd = date("M j, Y", $unixTimeEnd);

so $eDateEnd is what I need to test. If it has no date, etc. I've
tried variations on the suggestions but I don't have it working.
Testing for "" does not work, doing is_null does not work...

Tom

=====
http://www.pixelmech.com/ :: Web Development Services
http://www.DMXzone.com/ :: Premium Content Author / JavaScript / Every Friday!
http://www.maccaws.com/ :: Group Leader
[Making A Commercial Case for Adopting Web Standards]

"That's not art, that's just annoying." -- Squidward


More information about the thelist mailing list