SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Remove characters before and after a value outputted from a swiped card!

  1. #1
    SitePoint Member
    Join Date
    Jan 2011
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Remove characters before and after a value outputted from a swiped card!

    I am making a clocking in machine for my company, we have decided to use swipe cards instead of using barcodes (why I dont know!!!) the only problem is that mag cards have two characters, one before and one after the value that is required i.e +000000000003? the value I really need is 000000000003
    Is there a way of removing these two characters using php?

    Thanks in advance

  2. #2
    SitePoint Member
    Join Date
    May 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  3. #3
    SitePoint Member
    Join Date
    Dec 2004
    Location
    laval
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    will prob look something like this
    Code:
    $string = '+000000000003?';
    $newstring = substr(1,strlen($string) - 2);

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •