Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Przerobienie tablicy na inną
damianooo
post
Post #1





Grupa: Zarejestrowani
Postów: 496
Pomógł: 2
Dołączył: 15.07.2011
Skąd: Katowice

Ostrzeżenie: (0%)
-----


Potrzebuję przerobić taką tablicę:

  1. array(80) {
  2. [0]=>
  3. array(7) {
  4. ["meet_id"]=>
  5. int(1)
  6. ["host"]=>
  7. string(12) "FC Barcelona"
  8. ["guest"]=>
  9. string(11) "Real Madryt"
  10. ["hostType"]=>
  11. int(0)
  12. ["guestType"]=>
  13. int(2)
  14. ["username"]=>
  15. string(6) "Damian"
  16. ["term"]=>
  17. string(23) "Wtorek,12-12-2016,21:00"
  18. }
  19. [1]=>
  20. array(7) {
  21. ["meet_id"]=>
  22. int(2)
  23. ["host"]=>
  24. string(15) "Atletico Madryt"
  25. ["guest"]=>
  26. string(10) "Sevilla FC"
  27. ["hostType"]=>
  28. int(1)
  29. ["guestType"]=>
  30. int(2)
  31. ["username"]=>
  32. string(6) "Damian"
  33. ["term"]=>
  34. string(23) "Wtorek,12-12-2016,21:00"
  35. }
  36. ...


na taką:

  1. array(10) {
  2. [0] => array(3) {
  3. ["meet_id"] => 1,
  4. ["host"] => "team 1",
  5. ["guest"] => "team 2",
  6. ["types"] => array(10) {
  7. ["0-1","0-0","2-1","0-1","-","2-1","0-1","0-0","-","2-1"]
  8. }
  9. }
  10. [1] .... itd.
  11. }



Jak to zrobić ?
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 23.08.2025 - 13:04