我有這樣環路雖然陣列,看看是否一個元素是空白的,輸出的HTML,如果不爲空白
Array
(
[0] => Array
(
[id] => 139
[name] => Eithne Maun
[contactNo] => 877692398
[email] => [email protected]
[address] =>
[county] => Cork
[country] => Ireland
[sourceOfContact] => Phone
[type] => Corporate
[dateAdded] => 2012-11-26
[companyName] =>
[dateOfBirth] =>
)
陣列)
欲通過陣列和僅顯示在每個元件循環下面的行如果值不是空的
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 />
是否有一個函數,我可以使用循環?
好的,謝謝你的幫助 –
做了這個工作o爲你呢? –
已經解決了嗎?如果是這樣,請接受答案,以便將其標記爲已解決。 –