This is a stupid piece of code that is making me crazy: why the for loop doesn't work ??
//name of the file to read into an array
$filegroup="/path/file.grp";
$users = file($filegroup);
echo ("<br>String of words in array at position 0 are: <br>".$users[0]."<br>");
//Now a new array is made and each word of the string is inserted into one array cell.
$pieces = explode (" ", $users[0]);
$lenght = sizeof($pieces);
echo ("<br>The number of records into array pieces is: ".$lenght);
//this is the stupid for loop that doesn't work.
for($cont=1; $cont<$length; $cont++)
{
echo $pieces[$cont];
echo $cont;
}
Thank for any help about
Fabio