Hm, you've been programming in C up 'til now, haven't you? :-)
Seriously, while PHP does have sprintf and the like, in most circumstances it's not really necessary, because like Perl it can do variable interpolation in strings.
What this means is that if you have
$a="qm_index_inc.php3";
include("include/qmbar/$a");
then PHP would replace the "$a" in that second string literal with the value of $a; in other words the above would have the same effect as:
include("include/qmbar/qm_index_inc.php3");
Hope that's been helpful!