title: Using str_replace multiple times on the same string
body: <p>I'm looping through a title from a table so it's essentially something along these lines.</p>
  
  <pre><code>foreach($c as $row){
      echo string_shorten($row['title']);
  }
  </code></pre>
  
  <p>What I'm doing is trying is a switch statement that would switch between what I want it to search for and once it's found replace it with what I choose in the str_replace:</p>
  
  <pre><code>function string_shorten($text){
      switch(strpos($text, $pos) !== false){
           case "Hi":
                return str_replace('Hi','Hello', $text);
           break;
      }
  }
  </code></pre>
  
  <p>Any suggestions or possible alternatives would be appreciated. It feels like I'm really close but not quite. </p>