You are here: Can't work out reason behind "unexpected T_VARIABLE" error « PHP Programming Language « IT news, forums, messages
Can't work out reason behind "unexpected T_VARIABLE" error

Posted by Cleverbum on 03/21/06 18:19

Hi,
been scratching my head for a while on this one and was wondering how
what was going wrong. I dont mind at this stage if the actual thing I'm
trying to do, just why on earth it wont accept that the variable is a
string and get on with it!!
the code is below, with the problem line highlighted.

<?
$myCounter=0;
$tabStr="";
$outStr[0]="";

myScanDir(".");

print_r($outStr);


function myScanDir($dir){
global $myCounter, $mytabStr, $outStr, $tablength;
$fileslist= scandir($dir);
for($i=0;$i<count($fileslist);$i++){
if(is_dir($fileslist[$i])){
$outStr[$myCounter]= $tabStr . $fileslist;
$myCounter ++;
$tabStr .= "&nbsp;&nbsp;";
$myScandir($fileslist[$i])
// the line below is the one which causes the errors.
$tabStr = substr($tabStr, 0, strlen($tabStr)-12);
}else{
$outStr[$myCounter]=$tabStr . $fileslist;
$myCounter++;
}
}
}
?>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация