$5 Paypal - Real Quick Job...

Discussion in 'Programming' started by you-cubez, Apr 27, 2009.

  1. #1
    Hi,

    Very simple for a PHP programmer who knows...

    We are trying to read the contents of a CSV file. However, for some reason if the following information exists in on of the columns:

    "£5 off"

    It is displayed as "5 off". So it seems when the first letter is a "£" it removed it. Any ideas?
     
    you-cubez, Apr 27, 2009 IP
  2. James Barcellano

    James Barcellano Active Member

    Messages:
    114
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    I would try using the HTML char entitys, I belive pound is & #163; without the space
     
    James Barcellano, Apr 27, 2009 IP
  3. you-cubez

    you-cubez Active Member

    Messages:
    842
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    60
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    Hi James - Sorry, I'm not sure what you mean... This is the code:

    
    $file_handle = fopen("codes.csv", "r");
    while (!feof($file_handle) ) 
    {
    	$line_of_text = fgetcsv($file_handle, 1024, ",");
    	$title = trim($line_of_text[1]);
                 $title2.= "{$title}";
    }
    
    PHP:
    However, if the $title in one of the rows is for example: "£5.00 off" - then it will echo as "5.00 off".
     
    you-cubez, Apr 27, 2009 IP
  4. James Barcellano

    James Barcellano Active Member

    Messages:
    114
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    Add me on Msn:
     
    James Barcellano, Apr 27, 2009 IP