View Full Version : Exploding a String Question

07-10-2005, 04:22 PM
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.

07-10-2005, 04:27 PM
Can't you use str_replace() to replace the spaces with tabs before you explode it?

07-10-2005, 04:43 PM
Many thanks, looks like exactly what I need.