General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old November 19th, 2003, 09:30 AM
roukr roukr is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 1 roukr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
parse error, unexpected T_STRING

A part of code, where is T_STRING and i dont see him... help me...
---------------------------------------------------------------------------
$col = 3; // pocet sloupcu
$c = 0; // docasne pocitadlo
while ($veta = mysql_fetch_array($vety)) {
if($c++ == 0) { // prvni sloupec
echo("<tr>");
}
echo("<td align="left"><a href="index.php?mesto=<? echo $veta[city]; ?>"><? echo $veta[city]; ?> (<? echo $num; ?>)</a></td>");
if($c == $col) { // posledni sloupec
echo("</tr>"); // konec radku
$c = 0; // pristi sloupec je prvni
}
}
// vycisteni
if($c > 0) {
while($c++ != $col) { // pro kazdy zbyvajici sloupec
echo("<td>&nbsp;</td>"); // pridat prazdnou bunku
}
echo("</tr>"); // konec radku
}
}
-----------------------------------------------------------------------

Reply With Quote
  #2  
Old November 19th, 2003, 11:05 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
It's a problem with your second echo statement. First, you've got unescaped quotes within quotes. Then you're opening and closing PHP tags within an echo statement. Can't do that. REwork that lineand you should be fine.

Reply With Quote
  #3  
Old November 21st, 2003, 06:26 AM
mattp23 mattp23 is offline
Moderated
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: UK
Posts: 82 mattp23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 43 m 44 sec
Reputation Power: 6
PHP Code:
echo("<td align="left"><a href="index.php?mesto=<? echo $veta[city]; ?>"><? echo $veta[city]; ?> (<? echo $num?> )</a></td>"); 

should be something like

PHP Code:
echo '<td align="left"><a href="index.php?mesto=' $veta[city] .'">' $veta[city] . ' (' $num ')</a></td>'


Let us know if it works

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > parse error, unexpected T_STRING


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT