I want a conditional statement to sit down within my WORDPRESS LOOP that reads the following - case a good example of things i need, I don't have sufficient understanding of PHP to structure this correctly:

It will read:

if the_author_meta('client_id') = 'custom-value-1' then display the following code
       <div><img src="http://www.mywebsite.com/<?php echo get_post_meta($post->ID, 'img-id', true) ?>"/></div>
else display nothing

The customer_id is saved in the_author_meta, therefore the function needs to determine the worth of client_id within thewritermeta and appearance whether it matches the worthiness I enter e.g. "custom-value-1". Whether it matches, it would display the div code, and when not, it might display nothing.

Can someone show me how you can structure this right into a proper PHP string please? I'm still learning PHP so this is a large assist in my understanding : - )

Zach

This will get it done.

<?php 
$client_id = get_the_author_meta('client_id');
if ($client_id == 'custom-value-1') { ?>
    <div><img src="http://www.mywebsite.com/<?php echo get_post_meta($post->ID, 'img-id', true) ?>" /></div>
<?php } ?>

See for comparison operators