# Smarty - Using a string as a 'template'?

**URL:** <https://forum.kirupa.com/t/smarty-using-a-string-as-a-template/278942>\
**Category:** programming\
**Created:** [January 7, 2009, 8:41pm UTC](https://forum.kirupa.com/t/smarty-using-a-string-as-a-template/278942 "2009-01-07T20:41:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lorren\_biffin](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/lorren_biffin/32/2726_2.png) [@lorren\_biffin](https://forum.kirupa.com/u/lorren_biffin)\
**Post date:** [January 7, 2009, 8:41pm UTC](https://forum.kirupa.com/t/smarty-using-a-string-as-a-template/278942/1 "2009-01-07T20:41:19Z")

</div>

Is it possible to send a string through Smarty to be parsed, instead of sending a .tpl file through?

For instance, say I have this string:

```auto

// ...

$ParseMe = "This is a string that I want to parse, to retrieve the value of the {$Awesome} Smarty tag...";

// ...

```

And now I want to parse the $ParseMe var, to bring about the same output that I would if the string was part of a .tpl file…

Is this doable?

[whisper]Short and sweet. 😛 Let me know if you have any questions.[/whisper]
