Basically I need to know the javascript's equivalent of php's explode and implode functions. Here is what the explode and implode functions do: Let's say I have a string: $some_string = '13:42:43:56'; I want to break down each number into an array called $num_array. in PHP I could just do this: $num_array = explode(':',$some_string); The PHP implode function would produce the following: $num_array[0] = 13 $num_array[1] = 42 $num_array[2] = 43 $num_array[3] = 56 Then let's say I wanted to piece it back into the original string. I could just do this in php: $some_string = implode(':',$num_array); Any idea how to accomplish this in javascript? Thanks a lot for your help and time. I really appreciate it.
|