Niroshan is right. However it can be done this way too:
$VarName="voila!";
$image_dir= "photos/images/$VarName";
echo $image_dir;
gives
photos/images/voila!
This is true for double quoted (" ") strings only. Single quoted strings do not expand variables:
$VarName="voila!";
$image_dir= 'photos/images/$VarName';
echo $image_dir;
gives the expected
photos/images/$VarName
Pitfall - in a case like this
$var="tball supporters ";
echo "[COLOR=DarkRed]foo$varbar[/COLOR]";
It is not clear where the variable ends, so one needs to indicate it explicitly thus:
$var='tball supporters ';
echo "[COLOR=DarkGreen]foo${var}bar[/COLOR]";
So, if the character after the variable could be part of a var name, use curly brackets.