alienmojo Posted February 7, 2007 Share Posted February 7, 2007 echo "<table border='5'> <tr> <th>Picture</th> <th><a href="results.php?sort=1">Price</a></th> <th><a href="results.php?sort=2">Baths</a></th> <th><a href="results.php?sort=3">Bedrooms</a></th> <th>State</th> <th>City</th> <th><a href="results.php?sort=4">Square Feet</a></th> </tr>"; theres my code thats the part getting this error Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in C:\Documents and Settings\marquis taliaferro\Desktop\web page\results.php on line 203 Quote Link to comment Share on other sites More sharing options...
fert Posted February 7, 2007 Share Posted February 7, 2007 change the " to \" Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 7, 2007 Share Posted February 7, 2007 Or: echo '<table border='5'> <tr> <th>Picture</th> <th><a href="results.php?sort=1">Price</a></th> <th><a href="results.php?sort=2">Baths</a></th> <th><a href="results.php?sort=3">Bedrooms</a></th> <th>State</th> <th>City</th> <th><a href="results.php?sort=4">Square Feet</a></th> </tr>'; If you want to use a " inside of a string, you need to either mark the string with ' or escape them like Fert said. Same for ' and \'. Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted February 7, 2007 Share Posted February 7, 2007 or, another answer: echo <<<html <table border='5'> <tr> <th>Picture</th> <th><a href="results.php?sort=1">Price</a></th> <th><a href="results.php?sort=2">Baths</a></th> <th><a href="results.php?sort=3">Bedrooms</a></th> <th>State</th> <th>City</th> <th><a href="results.php?sort=4">Square Feet</a></th> </tr> html; then you can use either.... just a question. is it supposed to be <th> or <td>? Quote Link to comment Share on other sites More sharing options...
Gruzin Posted February 7, 2007 Share Posted February 7, 2007 Actually I use <td>, but you can also use <th>... Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted February 7, 2007 Share Posted February 7, 2007 well there you go, i always thought it was <td> only. is that new or old, because i learnt html like 7 years ago. Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 7, 2007 Share Posted February 7, 2007 <th> is a table header. HTML is a vast language, I'm sure there are many things you might not recognize - like fieldset and legend. Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted February 7, 2007 Share Posted February 7, 2007 nah i am quite familiar with those. very, actually. i am fairly experienced in html. i am quite good at tables, although i never heard of <th> before. odd. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.