splitting textarea input into multiple vars

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
red-g8r
Forum Newbie
Posts: 1
Joined: Sun Nov 10, 2002 9:51 am

splitting textarea input into multiple vars

Post by red-g8r »

Hi all,

Rather offbeat request here, I'll see if I can explain it correctly enough for you code-heads to help give me some insight of how to attempt this, or if its even possible at all:

Im looking to take a block of html textarea form input & split sections of it into usable variables or an array.

My intended audience would initially use another online form generator to derive a block of html form code.
I want to be able to use that resulting code by having them paste it into a form textarea field,
to be parsed by the individual form elements:
eg.

Code: Select all

<form action="cfio.php" method="post">
<input name="a" type="text" value="">
<input name="b" type="text" value="">
<input name="c" type="hidden" value="null">
<input name="d" type="hidden" value="null">
<input type="submit">
</form>
my intention is to take the inividual form elements & embed them into a flash/swf file, via a script I already have functioning. All thats left is parsing & assigning variables from this textarea field & I'm really stumped.

I'm thinking expressions, or maybe splitting, between individual "><" charachters, but not sure how to attempt it.
any Ideas? :?

TIA
Post Reply