For a little experiment, I was curious if it possible to replace strings like the ones below with content from an array, one after the other. Take a snippet like this for example:
<div class="container">
<h1>$$Insert text here$$</h1>
<div>
<p>My first paragraph.</p>
<div>$$Insert text here$$</div>
<div>
<input type="text" name="lname" placeholder="$$Insert text here$$"><br>
<p>Here some other text</p>
</div>
The string "$$Insert text here$$" would always be the same, I would like to replace each of them in a linear fashion with the content of an array such as:
var replacements=["This is a headline","I am a text","I am yet another text"];
Would this be possible in a simple way without the need to tame a templating engine? (Nothing against temp again, just curious)
Thanks!