is_null

General discussions related to php

Moderators: macek, egami, gesf

JakeWilliams
New php-forum User
New php-forum User
Posts: 4
Joined: Mon Nov 18, 2002 4:21 pm

is_null

Postby JakeWilliams » Fri Dec 27, 2002 5:06 pm

I'm using php v4.2.4
The php manual says any version >= 4.0.4 should support the function is_null, but my version is not recognizing it. Is there something I have to do to get this function operational?

Thanks,
Jake

User avatar
Joan Garnet
Moderator
Moderator
Posts: 387
Joined: Sat Aug 03, 2002 2:56 am
Location: Mars
Contact:

Postby Joan Garnet » Fri Dec 27, 2002 9:21 pm

It appears to be a normal function...
http://www.php.net/manual/en/function.is-null.php
Why don't you post a little piece of code just in case...
bye!

JakeWilliams
New php-forum User
New php-forum User
Posts: 4
Joined: Mon Nov 18, 2002 4:21 pm

is_null

Postby JakeWilliams » Tue Dec 31, 2002 6:24 am

My main indication is the function is_null() does not highlight in blue as do other functions. I am using Dreamweaver MX.

Code: Select all

if (is_null($row_listContract['address_line_1'])) {
  echo "It is null.";
} else {
  echo "It is not null."
}

'address_line_1' is a database field that I've confirmed is null on the table. I am always getting the result 'It is not null'.

User avatar
Joan Garnet
Moderator
Moderator
Posts: 387
Joined: Sat Aug 03, 2002 2:56 am
Location: Mars
Contact:

Postby Joan Garnet » Tue Dec 31, 2002 7:29 am

Well, the variable is empyt, but it actually exists as soon as the column was created.
Better use this:

Code: Select all

if ($row_listContract['address_line_1'] = "") {
  echo "It is null.";
} else {
  echo "It is not null."
}


bye!
;)


Return to “PHP General”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests