mindapolis Posted May 5, 2011 Share Posted May 5, 2011 WHAT DOES "\PARSE ERROR SYNTAX ERROR UNEXPECTED T_NUMBER" mean? Link to comment https://forums.phpfreaks.com/topic/235567-error-meaning/ Share on other sites More sharing options...
btherl Posted May 5, 2011 Share Posted May 5, 2011 It means the parser expected something else and it got a number. Usually it's because of mismatched brackets, quotes, or other similar mistakes. If you paste the line which the error mentioned we may be able to point out the exact location of the error. Link to comment https://forums.phpfreaks.com/topic/235567-error-meaning/#findComment-1210708 Share on other sites More sharing options...
fugix Posted May 5, 2011 Share Posted May 5, 2011 means that the parser was not expecting a number where it is, can we see the code? Link to comment https://forums.phpfreaks.com/topic/235567-error-meaning/#findComment-1210710 Share on other sites More sharing options...
mindapolis Posted May 5, 2011 Author Share Posted May 5, 2011 <?php echo <<<HEREDOC <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <link href="dance.css" rel="stylesheet" type="text/css"> <style type="text/css"> table#calendar td{ background-color: #FFFFFF; text-align: left; height: 100px; width: 100px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; } #calendar { margin-right: auto; margin-left: auto; } caption { text-align: right; } </style> <script type="text/javascript" language="JavaScript1.2" src="stm31.js"></script> </head> <body> <div id = "logo"> <img src="assets/logo.gif" alt="logo" /> </div> <ul id = "menu"> <script type="text/javascript" language="JavaScript1.2"> <!-- beginSTM("menu1023678795","static","0","0","left","false","true","310","50","0","250","","blank.gif"); beginSTMB("auto","0","0","vertically","arrow_r.gif","7","7","1","3","transparent","","tiled","#000000","0","solid","0","Normal","50","0","0","7","7","0","0","2","#000000","false","#000000","#000000","#000000","none"); appendSTMI("false","Home","left","middle","","","-1","-1","0","normal","transparent","transparent","","1","-1","-1","blank.gif","blank.gif","-1","-1","0","","index.html","_self","Arial","11pt","#0089cc","bold","italic","none","Arial","11pt","#e3b4ea","bold","italic","none","0","solid","#cccccc","#cccccc","#999999","#999999","#cccccc","#cccccc","#999999","#999999","index.html","twobar.gif","blank.gif","tiled","tiled"); appendSTMI("false","Testimony","left","middle","","","-1","-1","0","normal","transparent","transparent","","1","-1","-1","blank.gif","blank.gif","-1","-1","0","","testimony.phtml","_self","Arial","11pt","#0089cc","bold","italic","none","Arial","11pt","#e3b4ea","bold","italic","none","0","solid","#cccccc","#cccccc","#999999","#999999","#cccccc","#cccccc","#999999","#999999","testimony.phtml","twobar.gif","blank.gif","tiled","tiled"); appendSTMI("false","Class Description","left","middle","","","-1","-1","0","normal","transparent","transparent","","1","-1","-1","blank.gif","blank.gif","-1","-1","0","","classDescription.phtml","_self","Arial","11pt","#0089cc","bold","italic","none","Arial","11pt","#e3b4ea","bold","italic","none","0","solid","#cccccc","#cccccc","#999999","#999999","#cccccc","#cccccc","#999999","#999999","classDescription.phtml","twobar.gif","blank.gif","tiled","tiled"); appendSTMI("false","Schedule of Classes ","left","middle","","","-1","-1","0","normal","transparent","transparent","","1","-1","-1","blank.gif","blank.gif","-1","-1","0","","calendar.phtml","_self","Arial","11pt","#0089cc","normal","normal","none","Arial","11pt","#e3b4ea","normal","normal","none","0","solid","#d6d6ce","#d6d6ce","#d6d6ce","#d6d6ce","#d6d6ce","#d6d6ce","#d6d6ce","#d6d6ce","calendar.phtml","","","tiled","tiled"); appendSTMI("false","Forms","left","middle","","","-1","-1","0","normal","transparent","transparent","","1","-1","-1","blank.gif","blank.gif","-1","-1","0","","","_self","Arial","11pt","#0089cc","bold","italic","none","Arial","9pt","#e3b4ea","bold","italic","none","0","solid","#cccccc","#cccccc","#999999","#999999","#cccccc","#cccccc","#999999","#999999","","twobar.gif","blank.gif","tiled","tiled"); beginSTMB("down","50","0","vertically","","0","0","0","3","transparent","","tiled","#000000","0","solid","0","Fade","32","0","0","0","0","0","0","0","#7f7f7f","false","#000000","#000000","#000000","none"); appendSTMI("false","Registration Form","left","middle","","","-1","-1","0","normal","transparent","transparent","","1","-1","-1","blank.gif","blank.gif","-1","-1","0","","register.php","_self","Arial","11pt","#0089cc","bold","italic","none","Arial","11pt","#e3b4ea","bold","italic","none","0","solid","#d6d6ce","#d6d6ce","#d6d6ce","#d6d6ce","#d6d6ce","#d6d6ce","#d6d6ce","#d6d6ce","register.php","twobar.gif","blank.gif","tiled","tiled"); appendSTMI("false","Legal Disclaimer","left","middle","","","-1","-1","0","normal","transparent","transparent","","1","-1","-1","blank.gif","blank.gif","-1","-1","0","","legal.php","_self","Arial","11pt","#0089cc","bold","italic","none","Arial","11pt","#e3b4ea","bold","italic","none","0","solid","#d6d6ce","#d6d6ce","#d6d6ce","#d6d6ce","#d6d6ce","#d6d6ce","#d6d6ce","#d6d6ce","legal.php","twobar.gif","blank.gif","tiled","tiled"); endSTMB(); endSTMB(); endSTM(); //--> </script> </ul> HEREDOC; $db_name ="mthomas"; require ("connect2db.inc.php"); $query="SELECT EventStartTime EventEndTime DanceType FROM classSchedule WHERE EventStartTime >= "3:00" "; $result = mysql_query($query); echo <<<HEREDOC <table id = "calendar"> <caption>May 2011</caption> <tr> <th>Sunday </th> <th>Monday </th> <th>Tuesday </th> <th>Wednesday </th> <th>Thursday </th> <th>Friday </th> <th>Saturday </th> </tr> <tr> HEREDOC; echo "<td>1</td> \n"; echo "<td>2 </td>\n"; echo "<td>3</td> \n"; echo "<td>4</td> \n"; echo "<td>5</td> \n"; echo "<td>6</td> \n"; echo "<td>7</td> \n"; echo "</tr>\n"; echo "<tr>\n"; echo "<td>8</td> \n"; echo "<td>9</td> \n"; echo "<td>10</td> \n"; echo "<td>11</td> \n"; echo "<td>12</td> \n"; echo "<td>13</td> \n"; echo "<td>14</td>\n"; echo <<<HEREDOC </tr> <tr> <td>15</td> <td>16</td> <td>17</td> <td>18</td> <td>19</td> <td>20</td> <td>21</td> </tr> <tr> <td>22</td> <td>23</td> <td>24</td> <td>25</td> <td>26</td> <td>27</td> <td>28</td> </tr> <tr> <td>29</td> <td>30</td> <td>31</td> </tr> </table> HEREDOC; ?> </body> </html> Link to comment https://forums.phpfreaks.com/topic/235567-error-meaning/#findComment-1210719 Share on other sites More sharing options...
fugix Posted May 5, 2011 Share Posted May 5, 2011 does it give a specific line for the error? if so can you show that line? Link to comment https://forums.phpfreaks.com/topic/235567-error-meaning/#findComment-1210720 Share on other sites More sharing options...
btherl Posted May 5, 2011 Share Posted May 5, 2011 $query="SELECT EventStartTime EventEndTime DanceType FROM classSchedule WHERE EventStartTime >= "3:00" "; Here you are using double quotes inside a double quoted string. You can do it like this instead: $query="SELECT EventStartTime EventEndTime DanceType FROM classSchedule WHERE EventStartTime >= \"3:00\" "; Link to comment https://forums.phpfreaks.com/topic/235567-error-meaning/#findComment-1210723 Share on other sites More sharing options...
mindapolis Posted May 5, 2011 Author Share Posted May 5, 2011 Actually I think I just fixed it. There was a tab after the heredoc, but why doesn't it like my query? Link to comment https://forums.phpfreaks.com/topic/235567-error-meaning/#findComment-1210724 Share on other sites More sharing options...
mindapolis Posted May 5, 2011 Author Share Posted May 5, 2011 so put 3:00 in single quotes? Link to comment https://forums.phpfreaks.com/topic/235567-error-meaning/#findComment-1210726 Share on other sites More sharing options...
btherl Posted May 5, 2011 Share Posted May 5, 2011 I've already posted the solution. Link to comment https://forums.phpfreaks.com/topic/235567-error-meaning/#findComment-1210729 Share on other sites More sharing options...
mindapolis Posted May 5, 2011 Author Share Posted May 5, 2011 That worked! Thank you so much! Link to comment https://forums.phpfreaks.com/topic/235567-error-meaning/#findComment-1210735 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.