Tuesday, May 18, 2010

sub string find and replace with new one

<?php

$posn = strpos($product_price, 'Coming Soon');

if ($posn !== false){?>

<?php $str = str_replace("Coming Soon", "", $product_price, $count);

$str2 = str_replace(" ", " class='Notify_button' style='float: left; margin-left:5px;' ", $str, $count);



echo $str2;

?>

1 comment:

  1. What a useful information you shared in this post! Thanks for sharing.
    Virtuemart Flypage Templates

    ReplyDelete