试图在PHP中使用字符串替换功能而不起作用

I have a variable called $info['order-total'] that contains some html, within that HTML are the strings 'Delivery' and 'Collection'. I am trying to replace these with the string 'Card Charge'. Here is the code I have tried to achieve this with. I hope someone can help me here, I'm a beginner, thanks :)

<?php
  $total = str_replace("Delivery", "Card Charge", $info['order_total']);
  $total = str_replace("Collection", "Card Charge", $info['order_total']);
  print $total;

?>

Try this:

<?php
  $total = str_replace("Delivery", "Card Charge", $info['order_total']);
  $total = str_replace("Collection", "Card Charge", $total);
  print $total;
?>