![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 8 Pomógł: 0 Dołączył: 25.10.2008 Ostrzeżenie: (0%) ![]() ![]() |
Witam, mam pewien problem z dodaniem wartości zwracanej przez funkcję do stringu.
Otóż zgodnie z tym co jest opisane na php.net , napis echo powinien zwrócić wartość zwracaną przez funkcje, niestety nic się nie wyświetla. Wie ktoś może dlaczego? <?php function getName() { $a = 'ddd'; return a; } $b = 'b'; echo "This is the value of the var named by the return value of getName(): {${getName()}}"; ?> |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 8 Pomógł: 0 Dołączył: 25.10.2008 Ostrzeżenie: (0%) ![]() ![]() |
czyli jak?, mi na tym głównie zależało, żeby to co funkcja zwraca dodać do stringa, funkcje sam zrobiłem. echo "This is the value of the var named by the return value of getName(): {${getName()}}";
Ten post edytował andreu2311 18.02.2009, 23:38:48 |
|
|
![]() ![]() |
![]() |
Aktualny czas: 17.10.2025 - 06:38 |