WordPress’ bloginfo() is use to display information about your site such a the name or the or the template directory.
You can use it like this:
<?php bloginfo(‘template_directory) ?>
What you can’t do is to assign it to a variable. Why? because bloginfo() prints its output to the browser and create an error. If you want to use is at a variable or evaluate it then simply use the “get_” prefix like this:
<?php $template = get_bloginfo(‘template_directory) ?>
The difference is get_bloginfo() will return a value instead of echoing it.