What technique should I use to enter a `$variable` inside a block of text to store in mysql. 
For example:

> 
> Dear {name}, here is some stored text from the database. 
>  Thanks {company\_name}
> 
> 
> 

After retrieving that, I'm guessing I would use something like `preg_replace` to then convert the variable to a value like this

> 
> Dear Mr Smith, here is some stored text from the database. 
>  Thanks Company Ltd
> 
> 
> 

I know I could just use `preg_replace` but how would I avoid it replacing words with the same letters as the variable?