Jump to content

split an array


hyster

Recommended Posts

i have a set of array's with a similer layout as  t127201103111200

what i need to do is split it like this    t:1:27:2011:03:11:1200    (where the : is where i want the split but not add the : ).

so i end up with this.

$a = t

$b = 1

$c = 27

$d = 2011

$e = 03

$f = 11

$g = 1200

 

what i think i need to do is

split(char1($a), char2($b), char3,4($c)...........................)

 

but have no idea where to start.

 

Thanks for any help

Link to comment
Share on other sites

thanks. i didnt think about the auto increment

t127201103111200

 

$a = t = not changable

$b = 1 = changable. auto incrament

$c = 27 = changable. auto incrament

$d = 2011 = not changable. year

$e = 03 = not changable. day

$f = 11 = not changable . month

$g = 1200 = not changable. time

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.