How do I include a yet to be defined variable inside a string? PHP

doriam178

New Member
For sake of performing less database queries and for clarity of code, I'd like include a yet to be defined variable inside a string. Later in the page, the variable will be declared and the string printed and evaluated. How do i do this?\[code\]$str="This $variable is delicious";$array=array("Apple","Pineapple","Strawberry");foreach($array as $variable){ print "$str";}\[/code\]
 
Back
Top