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
https://forums.phpfreaks.com/topic/230414-split-an-array/
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
https://forums.phpfreaks.com/topic/230414-split-an-array/#findComment-1186590
Share on other sites

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.