How can i get the float value of the string in the array ? I need it in the invoice. 

```
foreach( $this->get_woocommerce_totals() as $key => $total ) :

        if($total['label']==="Subtotal") $subtotal = $total['value'];

endforeach;

```

print\_r($total);

```
Array ( [label] => Subtotal [value] => 8.144 lei )

```

I have tried but it did not help

```
$subtotal = (float)$total['value']; 
$subtotal = floatval($total['value']);

```