Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Jak pobrać z tablicy?
Forum PHP.pl > Forum > PHP
herWALDI
Witam,
mam mały problem..
Jak pobrać z tej tablicy element 'large' zz tablicy o parametrze position 4? Dodam, że tablica wypluwa 'position 4' nie zawsze w tym miejscu.. poniżej przykłady:

  1. [thumbnails] => Array
  2. (
  3. [0] => SDK_3D_Pack\lib\filter\ThumbnailFilter Object
  4. (
  5. [large] => xxx
  6. [thumb] => xxx
  7. [position] => 5
  8. )
  9.  
  10. [1] => SDK_3D_Pack\lib\filter\ThumbnailFilter Object
  11. (
  12. [large] => xx
  13. [thumb] => xx
  14. [position] => 3
  15. )
  16.  
  17. [2] => SDK_3D_Pack\lib\filter\ThumbnailFilter Object
  18. (
  19. [large] => xxxxx
  20. [thumb] => xxxxx
  21. [position] => 2
  22. )
  23.  
  24. [3] => SDK_3D_Pack\lib\filter\ThumbnailFilter Object
  25. (
  26. [large] => xxxxxxx
  27. [thumb] => xxxxxxx
  28. [position] => 4
  29. )


  1. [thumbnails] => Array
  2. (
  3. [0] => SDK_3D_Pack\lib\filter\ThumbnailFilter Object
  4. (
  5. [large] => xxx
  6. [thumb] => xxx
  7. [position] => 2
  8. )
  9.  
  10. [1] => SDK_3D_Pack\lib\filter\ThumbnailFilter Object
  11. (
  12. [large] => xx
  13. [thumb] => xx
  14. [position] => 4
  15. )
  16.  
  17. [2] => SDK_3D_Pack\lib\filter\ThumbnailFilter Object
  18. (
  19. [large] => xxxxx
  20. [thumb] => xxxxx
  21. [position] => 3
  22. )
  23.  
  24. [3] => SDK_3D_Pack\lib\filter\ThumbnailFilter Object
  25. (
  26. [large] => xxxxxxx
  27. [thumb] => xxxxxxx
  28. [position] => 1
  29. )
nospor
No to iterujesz po tablicy (foreach) i patrzysz gdzie position == 4 i juz
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.