Jump to content
MakeWebGames

Section of code help


Recommended Posts

Hey guys,

Sorta stuck on this section of code here. I've ran through almost every iteration of this. Trying to set this up so only if a certain variable is more 0 does the row actually get printed on the screen, starting on line 12. Just get a white screen. Error message is not helpful at all: Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING on line <b>17

I've changed and added many single and double quotes, no dice.

 

echo "
					<div style='text-align:center;color:limegreen;font-weight:bold;'><div id='clock'></div></div><br />
						<tr style='background:#000000;'>
							<th>Objective</th>
							<th>Current Amount/Needed</th>
						</tr>
						<tr style='background:#C0C0C0;'>
							<td>{$mission['task_one']}</td>
							<td>".number_format($minfo['task_one_amount'])."</td>
							<td>".number_format($mission['task_one_amount'])."</td>
						</tr>";
						if($minfo['task_two_amount'] > 0) 
						{
						echo "
						<tr style='background:#ececec;'>				                 
							<td>{$mission['task_two']}</td>
							<td>'.number_format($minfo["task_two_amount"]).'</td>
							<td>'.number_format($mission["task_two_amount"]).'</td>
						</tr>";
						}
						if($minfo['task_three_amount'] > 0) 
						{
						echo "
						<tr style='background:#C0C0C0;'>
							<td>{$mission['task_three']}</td>
							<td>'.number_format($minfo["task_three_amount"]).'</td>
							<td>'.number_format($mission["task_three_amount"]).'</td>
						</tr>";
Link to comment
Share on other sites

echo "<tr style='background:#ececec;'>                               
<td>{$mission['task_two']}</td>
<td>'.number_format($minfo["task_two_amount"]).'</td>
<td>'.number_format($mission["task_two_amount"]).'</td>
</tr>";

 

to

 

echo "<tr style='background:#ececec;'>                               
<td>{$mission['task_two']}</td>
<td>".number_format($minfo['task_two_amount'])."</td>
<td>".number_format($mission['task_two_amount'])."</td>
</tr>";

 

Etc

Link to comment
Share on other sites

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.   Paste as plain text instead

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