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 );

```
This problem is a little bit more complicated than I guess you realize. Most obvious is that you'll have to deal with exchange rates for all currencies you want to handle.

```
function TranslateRate($str, $currency)
{
    $def_rate = 100;

    if (!preg_match('/\{(\d+)\}/', $str, $value))
        return $str; // Noting to translate

    if ($currency = '$')
    {
        $dollar_rate=120;

        $val_rate = ($value[1] / $def_rate);

        return preg_replace('/(\{\d+\})/', $val_rate*$dollar_rate, $str);
    }

    // 'Unknown currency';

    return $str;
}

echo TranslateRate("this offer starts at {5000}", '$');

```

This is a very crude version of your translation routine, but it should give you the idea on how to continue.

I don't even know how to use floating point arithmetic's in php so the rates are in cents.

See it working [at phpfiddle](http://phpfiddle.org/main/code/d22-rkt).