- Code: Select all
$bands= "";
$file= fopen("bands.txt", "r");
while (!feof ($file)) { $bands.= fgets($file); }
fclose ($file);
$bandsArray= explode("/*****/", $bands);
for ($i= 0; $i < count($bandsArray); ++$i)
{
echo($bandsArray[$i]{0});
}
In this example, the array is containing 9 elements that can be all seen if I don't put the {0} in the echo function. The problem is that I only see the first char of only the first element.
Also, if I declare my array with explicit content like this
- Code: Select all
$bandsArray= array("Ab", "Bc", "Cd", "De", "Ef", "Fg", "Gh", "Hi", "Ij");
Why is it doing this?


