I have an array like this
PHP Code:
Array
(
[0] => Array
(
[id] => 139
[name] => Eithne Maun
[contactNo] => 877692398
[email] => eithne@yahoo.co.uk
[address] =>
[county] => Cork
[country] => Ireland
[sourceOfContact] => Phone
[type] => Corporate
[dateAdded] => 2012-11-26
[companyName] =>
[dateOfBirth] =>
)
)
I want to loop through each element in the array and only display the lines below if the value is not blank
PHP Code:
Number: <?php htmlout($contact[0]['contactNo']);?><br />
Email: <?php htmlout($contact[0]['email']);?><br />
Address: <?php htmlout($contact[0]['address']);?><br />
County: <?php htmlout($contact[0]['county']);?><br />
Country: <?php htmlout($contact[0]['country']);?><br />
Type of Contact: <?php htmlout($contact[0]['type']);?><br />
Company Name: <?php htmlout($contact[0]['companyName']);?><br />
Date of Birth: <?php htmlout($contact[0]['dateOfBirth']);?><br />
Is there a function with a loop that i could use??