I have this code
$text = "Hello $person";
$persons = array("Mike", "Tom", "Foo");
foreach ($persons as $person) {
echo $text."<br>";
}
The goal is to display:
Hello Mike<br>
Hello Tom<br>
Hello Foo<br>
I thought about using {} and $$, but that doesn't seem to be ok. What am I missing?
echo "Hello ".$person."</br>";instead. No need for the$textstring then