Jump to content

How do I test if a record is empty in my database.


poleposters

Recommended Posts

Hi,

 

I'm grabbing some data out of my database but want to check if its empty before I print it.

 

This is what I'm doing.

 

$phone= 555 5555;

print "Ph:$phone";

 

The problem is if $phone contains an empty string. Ph: will still print. And that looks kinda odd on my page.

 

Can anyone help?

 

Cheers.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.