![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 153 Pomógł: 2 Dołączył: 28.05.2007 Skąd: Stamtąd Ostrzeżenie: (0%) ![]() ![]() |
Witam
ma problem z operacją na tablicy. Załóżmy, że mam tablicę: 1 => 'Kot' 2 => 'Pies' 3 => 'Krowa' Jest jakaś funkcja lub sposób, żeby zyskać indeks np. kota? Tak, żeby - w tym wypadku - zwróciło 1? -------------------- Raz, dwa, trzy, baba Jaga patrzy!
http://trelemorele.cba.pl |
|
|
![]() |
![]()
Post
#2
|
|
![]() Grupa: Moderatorzy Postów: 4 465 Pomógł: 137 Dołączył: 26.03.2004 Skąd: Gorzów Wlkp. ![]() |
Ten post edytował Cysiaczek 8.06.2007, 14:36:33 -------------------- To think for yourself you must question authority and
learn how to put yourself in a state of vulnerable, open-mindedness; chaotic, confused, vulnerability, to inform yourself. Think for yourself. Question authority. |
|
|
![]()
Post
#3
|
|
![]() Grupa: Zarejestrowani Postów: 740 Pomógł: 15 Dołączył: 23.08.2004 Skąd: Poznań Ostrzeżenie: (0%) ![]() ![]() |
-------------------- bigZbig (Zbigniew Heintze) | blog.heintze.pl
|
|
|
![]()
Post
#4
|
|
![]() Grupa: Zarejestrowani Postów: 296 Pomógł: 0 Dołączył: 9.05.2002 Skąd: Warszawa Ostrzeżenie: (0%) ![]() ![]() |
Chyba raczej array_search
-------------------- audaces fortuna iuvat!
|
|
|
![]()
Post
#5
|
|
![]() Grupa: Moderatorzy Postów: 4 465 Pomógł: 137 Dołączył: 26.03.2004 Skąd: Gorzów Wlkp. ![]() |
Z ta róznicą, że array_keys zwróci wszystkie wystąpienia jako tablicę.
-------------------- To think for yourself you must question authority and
learn how to put yourself in a state of vulnerable, open-mindedness; chaotic, confused, vulnerability, to inform yourself. Think for yourself. Question authority. |
|
|
![]()
Post
#6
|
|
![]() Grupa: Zarejestrowani Postów: 1 116 Pomógł: 119 Dołączył: 10.05.2005 Skąd: Poznań Ostrzeżenie: (0%) ![]() ![]() |
|
|
|
![]()
Post
#7
|
|
![]() Grupa: Moderatorzy Postów: 4 465 Pomógł: 137 Dołączył: 26.03.2004 Skąd: Gorzów Wlkp. ![]() |
@Cezar708
Prózny Twój trud - istnieją (jak podaliśmy) wbudowane funkcje, które to zrobią. : > -------------------- To think for yourself you must question authority and
learn how to put yourself in a state of vulnerable, open-mindedness; chaotic, confused, vulnerability, to inform yourself. Think for yourself. Question authority. |
|
|
![]()
Post
#8
|
|
Grupa: Zarejestrowani Postów: 153 Pomógł: 2 Dołączył: 28.05.2007 Skąd: Stamtąd Ostrzeżenie: (0%) ![]() ![]() |
Mam jeszcze jedno pytanie, spytam tutaj.
Jak usunąć zmienną z tablicy, np. kota? bo: unset($array[1]); nie działa... -------------------- Raz, dwa, trzy, baba Jaga patrzy!
http://trelemorele.cba.pl |
|
|
![]()
Post
#9
|
|
![]() Administrator wortalu Grupa: Przyjaciele php.pl Postów: 960 Pomógł: 39 Dołączył: 21.10.2003 Skąd: Kraków Ostrzeżenie: (0%) ![]() ![]() |
Proszę o zapoznanie się z tematem: Temat: Tematyka i zasady panujące na forum Przedszkole a następnie o PW z poprawnym tematem.
Do tego czasu zamknięte. Otwieram. |
|
|
![]() ![]() |
![]() |
Aktualny czas: 19.08.2025 - 03:16 |