You are here:  » Printing the GBP sign


Printing the GBP sign

Submitted by ukdave on Sat, 2006-07-22 13:47 in

When I try to prepend the price with a £ pound sign like below it prints a question mark instead. Can someone tell me how to resolve this please.

<?php
function myRecordHandler($item)
  {
    print 
"<p>&nbsp;£".$item["PRICE"]."</p>";
  }
?>

Submitted by support on Sat, 2006-07-22 14:59

Hi Dave,

The best thing to do is to use the HTML entity &pound; to display the £ sign, so your code will look like this:

<?php
  
function myRecordHandler($item)
  {
    print 
"<p>&nbsp;&pound;".$item["PRICE"]."</p>";
  }
?>

Cheers,
David.

Submitted by ukdave on Sat, 2006-07-22 16:55

Hi Dave, thanks for that!

I tried using hex as in "%A3" but that wouldn't work.