title: PHP Getting the SUM from two values from a complicated string
body: <p>im kinda new to programming so im sorry if this is a simple question.</p>
  
  <p>I got the following two strings. </p>
  
  <p><code>&lt;Programvalue&gt;52,45 €&lt;Januari&gt;'</code></p>
  
  <p><code>&lt;Programvalue&gt;21,18 €&lt;February&gt;'</code></p>
  
  <p>I want to get the two values and get the sum of them.
  I tried the following</p>
  
  <pre><code>$str1 = "&lt;Programvalue&gt;52,45 €&lt;Januari&gt;";
  $str2 = "&lt;Programvalue&gt;21,18 €&lt;February&gt;";
  
  $st1 = explode('&gt;',$str1,0);
  $st2 = explode('&gt;',$str2,0);
  
  $s1 = str_replace(" €","",$st1);
  $s2 = str_replace(" €","",$st2);
  
  $sum1 = implode( "", $s1 );
  $sum2 = implode( "", $s2 );
  
  
  $sum = $sum1 + $sum2;
  
  echo $sum;
  </code></pre>
  
  <p>But the output keeps being 0</p>
  
  <p>What do I have to do to get the output 73.63 ?</p>
  
  <p>Thanks for all the help and I'm sorry if this question is really stupid. tbh i kinda feel stupid for not finding a solution myself :(</p>