i've been having some troubles getting values displayed on my site, which you lovely people have helped me fix.
The latest is as follows
Code: Select all
<td>
<span class="tpj_location"><?php if($row->city !="") { echo $row->city.","; }?>
<?php if($row->state !="") { echo $row->state."<br/>"; }?></span>
<em><?php if($row->country !="") { echo $row->country; }?></em>
</td>So I'm not fully understanding this code. I know that the IF statement is used to get something to to happen IF a certain criteria is met, but i don't know what's actually being required from this code, or how the country field is pulling the text value and ignoring the record number/id.
so can someone tell me:-
1. what !="" does in above code
2. some reasons why the country field would be displayed and the other two fields are only displaying record numbers.
Thanks