Jump to content

Simple if Statement! Please Help.


jamjam

Recommended Posts

Hi

 

I am developing a page that has this PHP code <?php echo $row_Programme['status']; ?>

This code basically looks in a MySQL database table and echo’s the value of the status field.

 

The value of the Status field will only ever have 5 possible values.

I want to add an ‘if statement’ to the above code.

So for example if the value returned by the code was “Coming Soon”

I can add something like “Programme will be available soon”

 

A second example would be if the value returned by the code was “Not Available”

I can add something like “Sorry programme is not available”

 

This properly really basic PHP.

But am really new to this and will really appreciate the assistance.

 

Thanks in advance.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.