Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]problem z tablica tablica
-tut-
post
Post #1





Goście







Witam,
var_dump(); zwraca poprawnie tablice po zapytaniu.
array(1) { [0]=> array(10) { [0]=> string(2) "21" ["IDphoto"]=> string(2) "21" [1]=> string(24) "5669e77aaeac774c0cd8.jpg" ["img"]=> string(24) "5669e77aaeac774c0cd8.jpg" [2]=> string(24) "c527a2b76d99de4dcfa3.jpg" ["crop"]=> string(24) "c527a2b76d99de4dcfa3.jpg" [3]=> string(0) "" ["author"]=> string(0) "" [4]=> string(19) "2011-06-08 21:07:01" ["dataphoto"]=> string(19) "2011-06-08 21:07:01" } }


  1. $IDphoto = $model->fetch("WHERE img='$resize'");
  2. var_dump($IDphoto);
  3. echo $IDphoto['img'];


Jednak nie moge wyciągnąć wartości pola img z tablicy co robie nie tak?

pozdrawiam
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 6)
gargamel
post
Post #2





Grupa: Zarejestrowani
Postów: 278
Pomógł: 35
Dołączył: 25.06.2010

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


  1. echo $IDphoto[0]['img'];
Go to the top of the page
+Quote Post
bastard13
post
Post #3





Grupa: Zarejestrowani
Postów: 664
Pomógł: 169
Dołączył: 8.01.2010
Skąd: Kraków

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


  1. echo $IDphoto[0]['img'];
(IMG:style_emoticons/default/smile.gif)

@up
za wolny jestem:P

Ten post edytował bastard13 8.06.2011, 20:21:10
Go to the top of the page
+Quote Post
-tut-
post
Post #4





Goście







dziala dzieki.Skad taki zapis?.Zawsze uzywalem takiego zapisu jaki pokazałem na początku i hulało?
Go to the top of the page
+Quote Post
gargamel
post
Post #5





Grupa: Zarejestrowani
Postów: 278
Pomógł: 35
Dołączył: 25.06.2010

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


Tu masz tablicę w tablicy, przyjrzyj się.
Go to the top of the page
+Quote Post
-tut-
post
Post #6





Goście







może to głupio zabrzmi..ale po co używa się takiego manewru?(IMG:style_emoticons/default/biggrin.gif)
Go to the top of the page
+Quote Post
gorden
post
Post #7





Grupa: Zarejestrowani
Postów: 486
Pomógł: 101
Dołączył: 27.06.2010

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


to jest tablica wielowymiarowa. a używa się ją dla takiego samego celu, jak tablicę.
Go to the top of the page
+Quote Post

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 - 23:30