Question: I am trying to get all hyperlinks from this

```
<div class="eod-rhs">
<ul>
<li><a href="">sdf</a></li>
<li><a href="">sdf</a></li>
</ul></div>

```

above code is in iframe so i tried this but i am not getting proper result.

```
var links = $("#frametest").contents().find(".eod-rhs").find('a').attr('href').next();  

```

Answer: 
```
$sMyPromotion = preg_replace('@{(\d+)}@', '\\1$', $sMyPromotion);

```

or use preg\_replace\_callback:

```
$sMyPromotion = preg_replace_callback ( '@{(\d+)}@', 
        function ($matches)
        {

            return $matches [1] . '$';

        }, $sMyPromotion );

```
Why not just put the variable into the string? Like `$sMyPromotion = 'this offer starts at '.$valueYouNeed;`?