Removing quotes from an array, string or txt file see code



I'm trying to process a tab delimited file where each line in the file
has around 12 tab delimited elements. My problem is the elements are
surrounded by "quotes" and I need the script to remove the quotes
after loading the file to the $addresses variable.
The quotes need to be removed somewhere within the code below or by
processing the file before loading.

//read in the name and address lines from the txt file
//each line becomes an element in the array
$addresses= file("download.txt");

//count the number of address lines in the array
$number_of_addresses = count($addresses);
if ($number_of_addresses == 0)
{
echo "No addresses to process";
}

echo "<table>";

for($i=1; $i<$number_of_addresses; $i++)
{
//split each line or row
$line = explode("\t",$addresses[$i]);

TIA

More info if required

.



Relevant Pages

  • Re: understanding arrays, and their use
    ... > path enclosed by double quotes, or several space separated words, ... > field, option1) and its value (4th field, string or boolean). ... understand how to access the other fields of the array that ... > "option1" (outside the array, which is tied to a widget), and I want to ...
    (comp.lang.tcl)
  • Re: Regex help
    ... you should loop through each short string array to count each string ... > array item's quotes number, the key point is to determine if the array's ... If it has odd number of quotes, mark it as start concatenate array ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Random Numbers
    ... I have a program that has character strings in an array, ... quotes to vary each time you start the program. ... method to accomplish this goal without user input? ... the conversion to integer will also happen automatically. ...
    (comp.lang.fortran)
  • Re: Foreach displaying data twice
    ... it should be in quotes. ... back to string, so it'll trigger some stupid notice.. ... The thing is, if you're calling a multidimensional array, you gotta use ... Thanks for setting me straight Rami! ...
    (comp.lang.php)
  • Re: Pointer-based arrays output strange
    ... news reader doesn't render. ... I'll assume these are quotes so you ... representation of an array in gfortran. ... is related to the construction of the dope vector in the internals of ...
    (comp.lang.fortran)