2
I have an "active.txt" file where you can find information blocks
Ex:
SACOLAO CENTER                                                
R RUA PAULINO MENDES LIMA,31                                  
CENTRO                                                        
45820440 EUNAPOLIS BA                                         
UNIQUE PISOS E REVESTIMENTOS                                  
R PAULINO MENDES LIMA,84                                      
CENTRO                                                        
45820440 EUNAPOLIS BA                                         
ZOO MANIA                                                     
AV PAULINO MENDES LIMA,185                                    
ANEXO I - CENTRO                                              
45820970 EUNAPOLIS BA 
I would like to read the entire file, and explode by block according to the white space between one and the other, for future I manipulate the lines of these blocks.
Ex:
$Array[1] = SACOLAO CENTER                                                
R RUA PAULINO MENDES LIMA,31                                  
CENTRO                                                        
45820440 EUNAPOLIS BA
And can display the lines of these blocks,
echo $Linha[0] = SACOLAO CENTER
echo $Linha[1] = R RUA PAILINO MENDES LIMA, 31
How could this be done?
great, exactly that, however, in the execution here, presents the problem. Parse error: syntax error, Unexpected '[' in line "5" Line 5: $lines = []; Usage Appserver windows.
– Wilson Lavrador
@Wilsonlavrador, if you put the string value
$ativos =directly with the contents of the fileativos.txt, makes a mistake?– Felipe Douradinho
of the same error Parse error: syntax error, Unexpected '[' in... on line "5"
– Wilson Lavrador