Entry
How can I transform a string into the variable that has the name that string?For ex:the string results by concatenating other strings.String="name_2".
May 18th, 2001 01:24
Ovidiu Oprescu,
Sorry,It's me the one who wrote the question,I figured out myself,in
the end, but because I think this is helpfull for others, I decided to
answer to my own question:
For this kind of situations exists what is called in PHP variable
variables:
for ex:
<?php
$a="nume";
$$a="John Smith";
echo "$a ${$a}";
?>
That's it!