Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Mar 2005
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exploding a String Question

    I have a form that you enter text into two variables per line. You can either type the data in manually with a space between the variables, or paste from Excel which puts a tab intbetween the variables.

    Currently I have a option box after the data entry field to identify the entry method, but I'd like to get rid of that and have teh exploed be able to handle either the [space] or [tab]. That or have the array checked for [space] and convert to [tab] prior to the explosion.

    Thanks for any help.

  • #2
    Regular Coder
    Join Date
    Feb 2005
    Location
    West Midlands, UK
    Posts
    623
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Can't you use str_replace() to replace the spaces with tabs before you explode it?

  • #3
    New Coder
    Join Date
    Mar 2005
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Many thanks, looks like exactly what I need.


  •  

    Posting Permissions

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