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


Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to