![]() ![]() |
Post
#1
|
|
|
Grupa: Zarejestrowani Postów: 150 Pomógł: 2 Dołączył: 14.06.2009 Skąd: Czestochowa Ostrzeżenie: (0%)
|
jak sprawdzić typ zmiennej?
|
|
|
|
Post
#2
|
|
|
Grupa: Zarejestrowani Postów: 333 Pomógł: 16 Dołączył: 13.05.2008 Skąd: Łódź Ostrzeżenie: (0%)
|
|
|
|
|
Post
#3
|
|
|
Grupa: Zarejestrowani Postów: 150 Pomógł: 2 Dołączył: 14.06.2009 Skąd: Czestochowa Ostrzeżenie: (0%)
|
nie rozumiem tej funkcji...
|
|
|
|
Post
#4
|
|
|
Grupa: Zarejestrowani Postów: 333 Pomógł: 16 Dołączył: 13.05.2008 Skąd: Łódź Ostrzeżenie: (0%)
|
funkcja sprawdza typ zmiennej. Czy zmienna jest ciągiem znaków (string), liczbą (integer), czy ma wartość logiczną (true/false), czy jest obiektem (object) czy tablicą (array).
(IMG:style_emoticons/default/party.gif) jak chcesz możesz też sprawdzać ciut inaczej, np. za pomocą funkcji is_array() - sprawdzasz czy zmienna jest tablicą - array(); is_int() - czy jest liczbą... Zobacz też: * settype() - Set the type of a variable * is_array() - Finds whether a variable is an array * is_bool() - Finds out whether a variable is a boolean * is_float() - Finds whether the type of a variable is float * is_int() - Find whether the type of a variable is integer * is_null() - Finds whether a variable is NULL * is_numeric() - Finds whether a variable is a number or a numeric string * is_object() - Finds whether a variable is an object * is_resource() - Finds whether a variable is a resource * is_scalar() - Finds whether a variable is a scalar * is_string() - Find whether the type of a variable is string Ten post edytował Larges 7.10.2009, 17:11:41 |
|
|
|
![]() ![]() |
|
Aktualny czas: 24.12.2025 - 19:15 |