Seems like "data-exptxt" only gets set once when r() is used inside a loop. For example: `foreach([1,2,3,4,5] as $n) { r($n); }` The result of the above code is that only the first output has "data-exptxt" set. All others do not.