Jump to content

Whats wrong with my If Statement


trigger999

Recommended Posts

HI Guys,

 

Newbie question

 

Can anybody help me with what is wrong with my IF Statement Please:

 

<td>if ($record['docs_available'] = "1"){ echo ".$record['status_name'].";}
   
        else {echo ".$record['docs_available'].";}
 
</td
 
 
 
 thanks in advance
Link to comment
Share on other sites

Your code is out of context as posted (BESIDES being posted here incorrectly to boot) so it makes it hard to tell you what to change. Show us some more code before this so we may see what mode you are in and what this line should therefore look like.

 

You don't tell us what is making you think it is wrong in the first place. We don't know if you have error checking turned on and are seeing a message or if you don't and are seeing a blank screen or if you are simply 'seeing' the php code on the screen because you are outside of php mode. At first glance the problem here is that you are burying php code inside your html code (bad practice - verrry bad) which is causing it to be not recognized as php.

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.