Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Problem z zapisaniem tablicy do pliku
-Qechua-
post
Post #1





Goście







Mam coś takiego:


  1. $rob = array_unique($rob);
  2. foreach ($rob as $tt) {
  3. $aResults[] = array( "id"=>0,"value"=>$tt);
  4.  
  5. $string = implode("\n",$aResults);
  6. $handle = fopen("tmp/pl.txt", "w");
  7. fwrite($handle,$string);
  8. fclose($handle);
  9. }


Plik co prawda zapisuje do pliku, ale tylko:

Array
Array
Array
Array
Array
Array
Array
Array
Array
Array


Próbowałem zamienić:

  1. $string = implode("\n",$aResults);

na
  1. $string = implode("\n",$aResults['value']);

itd, ale w takim wypadku nic nie zapisuje.

Co robię źle ?
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.08.2025 - 11:13