Danny620 Posted December 21, 2010 Share Posted December 21, 2010 Parse error: syntax error, unexpected T_IF in C:\xampp\htdocs\admin\updates_details.php on line 278 while ($data = mysqli_fetch_array($r, MYSQLI_ASSOC)) { echo '<table width="100%" border="1" cellpadding="5" cellspacing="5"> <tr> <td width="11%"><strong>Download</strong></td> <td width="34%"><strong>Update By: ' . $data['update_by'] . '</strong></td> <td width="48%"><strong>Date Created:</strong> ' . $data['dr'] . '</td> <td width="7%"><a href="delete.php?item=update&id=' . $data['update_id'] . '"><img src="../images/delete-icon.png" width="24" height="24" alt="delete" /></a></td> </tr> <tr> <td colspan="4">File: ' . if($data['file'] == 'Yes'){ $data['file']; } . 'Click Here to Download</td> </tr> <tr> <td colspan="4"><p>' . $data['update_msg'] . '</p></td> </tr> </table>'; } // End of WHILE loop. Link to comment https://forums.phpfreaks.com/topic/222253-parse-error-syntax-error-unexpected-t_if-in-cxampphtdocsadminupdates_deta/ Share on other sites More sharing options...
topcat Posted December 21, 2010 Share Posted December 21, 2010 while ($data = mysqli_fetch_array($r, MYSQLI_ASSOC)) { $temp = '<table width="100%" border="1" cellpadding="5" cellspacing="5"> <tr> <td width="11%"><strong>Download</strong></td> <td width="34%"><strong>Update By: ' . $data['update_by'] . '</strong></td> <td width="48%"><strong>Date Created:</strong> ' . $data['dr'] . '</td> <td width="7%"><a href="delete.php?item=update&id=' . $data['update_id'] . '"><img src="../images/delete-icon.png" width="24" height="24" alt="delete" /></a></td> </tr> <tr> <td colspan="4">File: '; if($data['file'] == 'Yes'){$temp .= $data['file']; } $temp.= 'Click Here to Download</td> </tr> <tr> <td colspan="4"><p>' . $data['update_msg'] . '</p></td> </tr> </table>'; echo $temp; } // End of WHILE loop. Link to comment https://forums.phpfreaks.com/topic/222253-parse-error-syntax-error-unexpected-t_if-in-cxampphtdocsadminupdates_deta/#findComment-1149710 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.