pocobueno1388 Posted January 24, 2007 Share Posted January 24, 2007 I have no idea why this while loop is giving me problems...I have used it this way many times before and have never had a problem with it.Error:[tt]Parse error: syntax error, unexpected ';' in /home/.leucorhinos/kernelgpf/dragon-dynasty.com/trade.php on line 65[/tt]Code:[code]<?php$incoming_sql = mysql_query("SELECT tradeID, sender, receiver, giving_type, giving, want_type, want FROM trades WHERE receiver='$sid'");$num = mysql_num_rows($incoming_sql);while ($i=0; $i<$num; $i++){print<<<HERE <td class=tstyle3 align='center'>$trade</td> <td class=tstyle3 align='center'>{$itrade['sender']}</td> <td class=tstyle3 align='center'>$want</td> <td class=tstyle3 align='center'>Accept</td> <td class=tstyle3 align='center'>Delete</td> <tr>HERE; }?>[/code]I appreciate all your help :) Link to comment https://forums.phpfreaks.com/topic/35589-while-loop-giving-me-an-error/ Share on other sites More sharing options...
kenrbnsn Posted January 24, 2007 Share Posted January 24, 2007 You're getting that error because use combined the syntax of a "for" loop with the "while" command. Change the "while" to a "for".Ken Link to comment https://forums.phpfreaks.com/topic/35589-while-loop-giving-me-an-error/#findComment-168542 Share on other sites More sharing options...
pocobueno1388 Posted January 24, 2007 Author Share Posted January 24, 2007 Oh my, I should slap myself. I meant to use a for loop in the first place. Thanks Ken. Link to comment https://forums.phpfreaks.com/topic/35589-while-loop-giving-me-an-error/#findComment-168543 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.