Jump to content

Ezekiel

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Ezekiel's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ah thankyou, getting closer :) but what are the Âs : £40 £40
  2. [quote author=ronverdonk link=topic=102724.msg408130#msg408130 date=1154531815] In statement [code]$newsalary = trim($salary, '£'); // remove the £ and add £ instead [/code] I can see that you remove the char, but where do you add the new one instead? Anyway, you could have done this more compact: [code] $sign = '&#163'; $newsalary = $sign.trim($salary, '£'); [/code] Ronald  ;D [/quote] Trim doesn't seem to work. I added your code to what I had, re submitted the data and came out with ££20
  3. Thankyou very much. It works, tho there is a small niggle. This is what seems to be echod with $newsalary after the £ has been changed. (for a £20 salary) ¦#163;20 which seems to indicate that there is something wrong with the &, possibly because this is a character that php itself uses? or...
  4. I am writing a form/php script to automate the process of making an xml. In this process I am trying to strip the '£' from a particular variable, and add '& # 163 ;' (sic) in it's place. With that I don't seem to be having very much luck. This is the code I am using at the moment. Any help is greatly appreciated. $sign = '&#163'; $pos = strpos($salary, '£'); if ($pos === false){     $newsalary = $sign.$salary; // add '&#163' to the $salary var }else{   $newsalary = trim($salary, '£'); // remove the £ and add '&#163'; instead }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.