To start off, I may be using sprintf in the wrong manner.
I'm making a framework plugin that takes strings as configuration. The strings have things that need to be swapped out, for example, one string would be a path template:
[root]/[template_directory]/something/specific/[theme_name].htm
The example above is pretty specific and has a lot of variables to be swapped out.
For less variables, I've been doing it like so:
sprintf('%s/some/file/path/theme.htm',documentroot);
However, I'm wondering if sprintf might be more obscure to use for more variables.
In the first example, should I be using a string replace for each variable, or should I use sprintf? Or am I horribly using sprintf wrong?
Any advice is greatly appreciated!