I am trying to count the number of characters in an array that originates as a text file.
I read the array to get its contents and assign a variable to it:
[php]
$txt_file = file_get_contents($fileloc);
$rows = explode("", $txt_file);
array_shift($rows);
foreach($rows as $row => $data)
{
//get row data
$row_data = explode(’/’, $data);
$info[$row]['id'] = $row_data[0];
$text = $row_data[0];
}
[/php]I do some other operations with the $text, without changing anything about it, and then use this call:
echo strlen($text);
The value returned is 84 but I know for a fact the correct number is 67. Any ideas? This is the contents of the text file:
3/4 B-1 PS PLK ALDER 7MDFSMROZ 48.5X96.5 47195 LMC P2EXEMPT-HP1-09