Advertisement
Guest User

Untitled

a guest
Nov 29th, 2013
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.70 KB | None | 0 0
  1. function plsh_get_price_html($price, $product )
  2. {
  3.     $price = str_replace('<span class="amount">', '', $price);
  4.     $price = str_replace('<span class="from">', '', $price);
  5.     $price = str_replace('</span>', '', $price);
  6.    
  7. /* THE FOLLOWING LINE IS EDITED! */
  8. $price = str_replace('From: ', '', $price);
  9.  
  10.     $price = str_replace('<ins>', '', $price);
  11.     $price = str_replace('</ins>', '', $price);
  12.     $price = str_replace('<del>', '<s>', $price);
  13.     $price = str_replace('</del>', '</s>', $price);
  14.    
  15.     if(strpos($price, '</s>') !== false)
  16.     {
  17.         $price_parts = explode('</s>', $price);
  18.         $price = $price_parts[1] . $price_parts[0] . '</s>';
  19.     }
  20.    
  21.     return $price;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement