title: str_replace by 2 array's created by sql
body: <p>I already know how to use string replace by creating an array manually:
  array('value1','value2','value3','value4');</p>
  
  <p>But how do I use str_replace by values from a Database?</p>
  
  <ul>
  <li>$original_string = (fruit_1+fruit_2+fruit_3);</li>
  <li>table1 database values: fruit_1 fruit_2 fruit_3</li>
  <li>table2 database values: 237 9388 2377</li>
  </ul>
  
  <p>output what i want: (237+9388+2377)</p>
  
  <p>The normal str_replace procedure i already know:
  $replaced_string =  str_replace($searchwords, $replacewords, $original_string );</p>
  
  <p>How do i get all the values from the <strong>database</strong> and process them by str_replace?
  Can this be done by creating an array or so?</p>
  
  <p>I use PDO to get values from the database.</p>
  
  <p>Thank you!!!</p>
  
  <p>Martijn</p>