Jump to content

If Statement =something?


eddiehowell

Recommended Posts

Hi Peeps,

 

I'm using this code.  It pulls 'Featured On' information for my releases, and displays them.  The problem I'm having is that if there are no values for 'Featured On',  then I don't want to display 'Featured On', with nothing underneath it.  Perhaps there's an 'if' statement e.g. if there is a value in 'featuredon', then echo.  Does that make sense, because I'm quite new to this? 

 

<?php

$values = get_post_custom_values("Featured On");

$featuredon = "Featured On";

echo $featuredon . $values[0]; ?><br>

 

Regards

Link to comment
https://forums.phpfreaks.com/topic/198951-if-statement-something/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.