[PHP] if $index=1 how can I create a variable named $column_1 by appending $index behind $columnname

2001-05-09 Thread Jay Lepore
I would like to loop through an array and create variable names such as column1, column2, column3 etc. where the number at the end comes from the value of index. For instance: 1) $toast=array("wheat", "rye", "pumpernickel"); 2) $numbreads=count($toast); 3) for($index=0;$index<$numbreads;$ind

[PHP] converting fields from a fixed length text file into an array

2001-05-06 Thread Jay Lepore
:Please forgive me for having posted this more than once. I am trying to reword it here to make it more plain. --- I have a fixed length text file I'm trying to import and send into MySQL. A record line is about 1600 characters long and includes many blank spaces. I thought by using

[PHP] FILE () STRIPS BLANKS FROM THE ARRAY - HOW CAN I STOP IT

2001-05-06 Thread Jay Lepore
I have an ASCII fixed width text file I'm trying to convert to an array of fields. But I need to keep the spaces in tact so I know exactly where one field ends and another begins. Do you know of any way to modify the default behavior of file() which strips the blanks spaces out when returning th

[PHP] file() shooting blanks

2001-05-06 Thread Jay Lepore
Hello, I have an ASCII fixed width text file I'm trying to convert to an array of fields. When I use file() to place each line (record) in it's own array element, it strips out any blanks it finds except one. This results in in ABC MOTORS becoming ABC MOTORS. That creates a problem if ABC is i