![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 576 Pomógł: 14 Dołączył: 9.11.2005 Ostrzeżenie: (20%) ![]() ![]() |
Hej, napisałem sobie :
mam teraz problem że jeśli $suma=123 ; liczba nie jest w ' ' to wywala mi bład.. co mogę z tym zrobić żeby czytało mi tą liczbe ? |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 691 Pomógł: 0 Dołączył: 19.01.2005 Skąd: Warszawa Ostrzeżenie: (0%) ![]() ![]() |
jeśli zaciapkujesz liczbę, jest ona traktowana jako string.
a strlen przyjmuje jako argument string, nie liczbę... int strlen ( string string ) See also count(), and mb_strlen(). |
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 576 Pomógł: 14 Dołączył: 9.11.2005 Ostrzeżenie: (20%) ![]() ![]() |
Ok mam odp dzieki
|
|
|
![]()
Post
#4
|
|
Grupa: Przyjaciele php.pl Postów: 5 724 Pomógł: 259 Dołączył: 13.04.2004 Skąd: N/A Ostrzeżenie: (0%) ![]() ![]() |
Zmien
$string = $suma; na $string = strval( $suma ); lub $string = (string)$suma; |
|
|
![]() ![]() |
![]() |
Aktualny czas: 3.10.2025 - 01:13 |