Jump to content


Photo

textarea explode


  • Please log in to reply
3 replies to this topic

#1 brown2005

brown2005
  • Members
  • PipPipPip
  • Advanced Member
  • 943 posts

Posted 01 September 2006 - 11:10 AM

i want someone to enter results into a textarea like

a
b
c
d

and then on the post script it will insert them into say table1 as separate entries..

#2 Mutley

Mutley
  • Members
  • PipPipPip
  • Advanced Member
  • 765 posts

Posted 01 September 2006 - 11:13 AM

What field input type will the area you enter results into be?
~ Mutley.

#3 brown2005

brown2005
  • Members
  • PipPipPip
  • Advanced Member
  • 943 posts

Posted 01 September 2006 - 11:14 AM

VARCHAR

#4 Jenk

Jenk
  • Members
  • PipPipPip
  • Advanced Member
  • 778 posts

Posted 01 September 2006 - 11:32 AM

$explodedTextArea = explode("\n", $textArea);

ot to prevent blank lines:
$exploded = preg_split("/\n+/m", $text);





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users