-2

I'm attempting to use PHP to make a configuration file. I have the variables set up to output to a final variable. However, when I'm trying to echo the output, it won't appear.

I've tried various solutions such as reformatting variables within the output variable.

<?php
   $var1 = "1";
   $var2 = "0";
   $var3 = "9";
   $varout = "{$var1}, {$var2}, {$var3};
   echo "Settings are {$varout}";
?>

Output:

Settings are {$varout}
Zeusarm
  • 1,038
  • 6
  • 14

2 Answers2

0

You are missing a closing double quote on your definition of $varout, add that and it will work.

0

You can use concenat operator "."

ankita
  • 33
  • 8