Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> funkcja w stringu
andreu2311
post
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()}}";


?>
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 559
Pomógł: 6315
Dołączył: 27.12.2004




Cytat
Otóż zgodnie z tym co jest opisane na php.net
Daj linka gdzie ten kod znalazles bo albo:
1) piszą tam wierutne bzdury
2) przepisales z bledem
lub
3) sam to na podstawie czegos wymysliles i zrobiles conajmniej dwa bledy (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
lub
4) oni tak mają na stronie i to oni mają tam conajmniej dwa bledy (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)
Go to the top of the page
+Quote Post

Posty w temacie


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: 16.10.2025 - 23:59