string code's tag archives

Javascript Equivalent of PHP’s explode() and implode()

Do you know javascript has equivalent functions as php's explode() and implode(). Let's say we have a string: We want to break down each number into an array called $num_array. In PHP we could do this: The PHP implode function would produce the following: In Javascript, we can use split function. Then let's say we wanted to piece it back into the original string. We could just do this in php: $string = implode(':',$explode_array); In Javascript, we c...