Guest User

Untitled

a guest
Jul 19th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.49 KB | None | 0 0
  1. 0235.000001-4 0235.213.00001295-8
  2.  
  3. `DUAS ALIANÇAS, NOVE ANÉIS, QUATRO BRINCOS, UM COLAR, SETE
  4. PENDENTES, QUATRO PULSEIRAS, DE: OURO BRANCO, OURO, PRATA
  5. PALÁDIO, OURO BAIXO; CONTÉM: pedra, diamantes; CONSTAM:
  6. amassada(s), defeito(s), falta, iniciais, incompleta(s), inscrições,
  7. partida(s), PESO LOTE: 37,80G (TRINTA E SETE GRAMAS E OITENTA CENTIGRAMAS)
  8.  
  9. R$ 2.198,00
  10.  
  11. Valor Grama: 58,15
  12.  
  13. array
  14. 0 =>
  15. array
  16. 0 => 0235.000001-4 0235.213.00001295-8
  17. 1 => 'DUAS ALIANÇAS, NOVE ANÉIS, QUATRO BRINCOS, UM COLAR, SETE PENDENTES, QUATRO PULSEIRAS, DE: OURO BRANCO, OURO, PRATA PALÁDIO, OURO BAIXO; CONTÉM: pedra, diamantes; CONSTAM: amassada(s), defeito(s), falta, iniciais, incompleta(s), inscrições, partida(s), PESO LOTE: 37,80G (TRINTA E SETE GRAMAS E OITENTA CENTIGRAMAS)'
  18. 2 => R$ 2.198,00
  19. 3 => 'Valor Grama: 58,15'
  20. 1 =>
  21. array
  22. 0 =>
  23. 1 =>
  24. 2 =>
  25. 3 =>
  26.  
  27. $file = fopen($fileName,"r") or exit("Unable to open file!");
  28.  
  29. if ( $file !== false ) {
  30.  
  31. $i = 0;
  32. $members = Array();
  33. while (!feof($file)) {
  34. $string = fgets($file);
  35. $string = preg_replace( "/r|n/", "", $string );
  36. $members[$i][] = $string;
  37. }
  38. var_dump($members);
  39. fclose($file);
  40. }
  41.  
  42. array (size=1)
  43. 0 =>
  44. array (size=30952)
  45. 0 => string '' (length=3)
  46. 1 => string '0235.000001-4 0235.213.00001295-8 ' (length=34)
  47. 2 => string '' (length=0)
  48. 3 => string 'DUAS ALIANÇAS, NOVE ANÉIS, QUATRO BRINCOS, UM COLAR, SETE ' (length=61)
  49. 4 => string 'PENDENTES, QUATRO PULSEIRAS, DE: OURO BRANCO, OURO, PRATA ' (length=59)
  50. 5 => string 'PALÁDIO, OURO BAIXO; CONTÉM: pedra, diamantes; CONSTAM: ' (length=59)
  51. 6 => string 'amassada(s), defeito(s), falta, iniciais, incompleta(s), inscrições, partida(s), ' (length=84)
  52. 7 => string 'PESO LOTE: 37,80G (TRINTA E SETE GRAMAS E OITENTA CENTIGRAMAS) ' (length=63)
  53. 8 => string '' (length=0)
  54. 9 => string 'R$ 2.198,00 ' (length=12)
  55. 10 => string 'Valor Grama: 58,15 ' (length=19)
  56. 11 => string '' (length=0)
  57.  
  58. $texto = "0235.000001-4 0235.213.00001295-8
  59. `DUAS ALIANÇAS, NOVE ANÉIS, QUATRO BRINCOS, UM COLAR, SETE PENDENTES, QUATRO PULSEIRAS, DE: OURO BRANCO, OURO, PRATA PALÁDIO, OURO BAIXO; CONTÉM: pedra, diamantes; CONSTAM: amassada(s), defeito(s), falta, iniciais, incompleta(s), inscrições, partida(s), PESO LOTE: 37,80G (TRINTA E SETE GRAMAS E OITENTA ENTIGRAMAS)
  60. R$ 2.198,00
  61. Valor Grama: 58,15";
  62.  
  63. $array= explode("n", $texto);
Add Comment
Please, Sign In to add comment