0

I have a Table where i want to Display time someone has worked. This comes from a mySql a Field should Display the minutes, and if a other field ist true, then it should be add "high" after the minutes

I tried this:

Print "<td width=50px>";
PRINT $info['minutes'] if($info['high'] == 0 ) {echo "Hoch"} ;

and got this:

Parse error: syntax error, unexpected 'if' (T_IF) in C:\xampp\htdocs\callinfo.php on line 63

Someone can Help? :)

1
  • Missing semi-colon, case issues... Commented Nov 23, 2013 at 17:55

3 Answers 3

2

You need to space out your code if you can't handle parse errors. Also, print/echo are pretty much same, use one or the other, not both, make your life easier in the future when you're looking for specific code.

PRINT $info['minutes'];
if ( $info['high'] == 0 ) {
    echo "Hoch";
}
Sign up to request clarification or add additional context in comments.

Comments

1

you need to add ;

PRINT $info['minutes'] ;
if($info['high'] == 0 )
{
   echo "Hoch";
}

Comments

1

It lacks a ; after PRINT $info['minutes']

PRINT $info['minutes'];

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.