Jump to content

Splitting up a string (response) into separate variables


jwhite68

Recommended Posts

Does anyone have any advice on how I can write a simple routine that can take a string that is received from a GET form action - knowing that the response will have data in this kind of format

 

field 1: N(2)

field 2: YYYYMMDDHHMMSS

field 3: N[12]

field 4: A[8]

field 5: A[15]

field 6: N[2]

field 7: A[3]

 

ie I know the format of the data coming back, but there are no delimiters or identifiers of any kind.

 

So I want to take the data response received and split it into variables $field1, $field2 etc.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.