Home >Backend Development >PHP Tutorial >Parse error: syntax error, unexpected T_DO, expecting ';' in

Parse error: syntax error, unexpected T_DO, expecting ';' in

WBOY
WBOYOriginal
2016-06-23 14:00:271280browse

提示这里错了。for ( ; do { $i 
要怎么改?谢谢


$sokey = split( "\\|", $sokey );$sort = "";if ( $rewrite == 1 ){				$i = 0;				for ( ;	do { $i < count( $indexfenlei[1] );	++$i,)								{												$sort .= "<dl><dt><a href='list.php?id-".$indexfenlei[1][$i]."-pn-0.html'>".$indexfenlei[3][$i]."</a></dt><dd>";												$sort .= "<a href='list.php?id-".$indexfenleix[1][$i]."-pn-0.html'>".$indexfenleix[3][$i]."</a> ";												$sort .= "<a href='list.php?id-".$indexfenleix[4][$i]."-pn-0.html'>".$indexfenleix[6][$i]."</a> </dd></dl>";												break;								}				} while ( 1 );}else if ( $rewrite == 2 ){				$i = 0;				for ( ;	do	{	$i < count( $indexfenlei[1] );	++$i,	)								{												$sort .= "<dl><dt><a href='list-".$indexfenlei[1][$i]."-0.html'>".$indexfenlei[3][$i]."</a></dt><dd>";												$sort .= "<a href='list-".$indexfenleix[1][$i]."-0.html'>".$indexfenleix[3][$i]."</a> ";												$sort .= "<a href='list-".$indexfenleix[4][$i]."-0.html'>".$indexfenleix[6][$i]."</a> </dd></dl>";												break;								}				} while ( 1 );}


回复讨论(解决方案)

$i = 0;
                for ( ;    do { $i 

//================
$max=count($indexfenlei[1]);
for($i=0;$i
这样?

do是毛。。

$i = 0;
  for ( ; do { $i 

//================
$max=count($indexfenlei[1]);
for($i=0;$i
这样?
程序是别人加了密的。我解开的。就是这样的

if ( $rewrite == 1 ){                          do { for ($i = 0; $i < count( $indexfenlei[1] );    ++$i,)                                {                                                $sort .= "<dl><dt><a href='list.php?id-".$indexfenlei[1][$i]."-pn-0.html'>".$indexfenlei[3][$i]."</a></dt><dd>";                                                $sort .= "<a href='list.php?id-".$indexfenleix[1][$i]."-pn-0.html'>".$indexfenleix[3][$i]."</a> ";                                                $sort .= "<a href='list.php?id-".$indexfenleix[4][$i]."-pn-0.html'>".$indexfenleix[6][$i]."</a> </dd></dl>";                                                break;                                }                } while ( 1 );}


改成这样试试。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn