jimfog Posted March 27, 2012 Share Posted March 27, 2012 Take a look at this code: if ($i < $startday-1)?> <td></td> <?php else Netbeens produces an error at <td></td>. I cannot understand where exactly the error is, somewhere there is a problem inserting that HTML td tag there. Link to comment Share on other sites More sharing options...
dsonesuk Posted March 27, 2012 Share Posted March 27, 2012 curly brackets ? if ($i < $startday-1){?> <td></td> <?php } else { Link to comment Share on other sites More sharing options...
jimfog Posted March 27, 2012 Author Share Posted March 27, 2012 Yes that work, i did not put brackets cause i thought that when after an if statement there is only one line of code thenthe brackets are not necessary. In the original version of the code i have not placed(the one with echos, not shown here) brackets were omitted and it was ok. It seems brackets are needed if "pure" HTML is to be placed. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.