Phasing HTML

From: Date: Tue, 19 Nov 2002 00:23:58 +0000
Subject: Phasing HTML
Groups: php.general 
Request: Send a blank email to php-general+get-125003@lists.php.net to get a copy of this message
OK I am trying to take some content from another site (I have total consent) and convert all the prices on the site to 5% more. I can get all the content off the site and display it where I want. I can ereg_replace all the money to one price such as ($23.50) but I can’t change the price based on what it was before I am using the following ereg_replace statements to change all the prices, I have tried several different ideas on how to change them bases on what they were before but have yet to succeed. $code = ereg_replace('[^[:space:]][0-9][0-9][0-9][0-9][^0-9][0-9][0-9]', (string) $stupid, $code); $code = ereg_replace('[^[:space:]][0-9][0-9][0-9][^0-9][0-9][0-9]', (string) $stupid, $code); $code = ereg_replace('[^[:space:]][0-9][0-9][^0-9][0-9][0-9]', (string) $stupid, $code); $code = ereg_replace('[^[:space:]][0-9][^0-9][0-9][0-9]', (string) $stupid, $code); I know that the ereg_replace statements aren’t right for what I want to do but I need to make them to figure out what regular expressions to use. Here is what I am trying to make happen: Select $20.25 from site a Convert it to $21.26 So basically let P = current price on site A And P * .05 = price I want to display on my site. Thanks for any help -Brian _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

« previous php.general (#125003) next »