Skip to content
Advertisement

Javascript Equivalent to PHP Explode()

I have this string:

0000000020C90037:TEMP:data

I need this string:

TEMP:data.

With PHP I would do this:

JavaScript

How do I effectively explode a string in JavaScript the way it works in PHP?

Advertisement

Answer

This is a direct conversion from your PHP code:

JavaScript
Advertisement