Hi Guys,
Hopefully a really easy one and i'm being totally thick, but i'm a bit puzzled!
I’m wanting to echo some records data out of my database:
Schema
companies
company_name
address_one
address_two
address_three
postcode
<?while ($obj=mysql_fetch_object($search_results)){
<?echo $obj->address_one; ?><br />
<?echo $obj->address_two; ?><br />
<?echo $obj->address_three; ?><br />
<?echo $obj->address_postcode; ?><br />
}?>
But say for example there is nothing in one of the records for address_two - nothing will be output, but the <br /> will still be there?
So how can I ask the page to only output the <br /> if data is being outputted - ie not empty?
Ta
Chris