
- Javascript Basics Tutorial
- Javascript - Home
- Javascript - Overview
- Javascript - Syntax
- Javascript - Enabling
- Javascript - Placement
- Javascript - Variables
- Javascript - Operators
- Javascript - If...Else
- Javascript - Switch Case
- Javascript - While Loop
- Javascript - For Loop
- Javascript - For...in
- Javascript - Loop Control
- Javascript - Functions
- Javascript - Events
- Javascript - Cookies
- Javascript - Page Redirect
- Javascript - Dialog Boxes
- Javascript - Void Keyword
- Javascript - Page Printing
- JavaScript Objects
- Javascript - Objects
- Javascript - Number
- Javascript - Boolean
- Javascript - Strings
- Javascript - Arrays
- Javascript - Date
- Javascript - Math
- Javascript - RegExp
- Javascript - HTML DOM
- JavaScript Advanced
- Javascript - Error Handling
- Javascript - Validations
- Javascript - Animation
- Javascript - Multimedia
- Javascript - Debugging
- Javascript - Image Map
- Javascript - Browsers
- JavaScript Useful Resources
- Javascript - Questions And Answers
- Javascript - Quick Guide
- Javascript - Functions
- Javascript - Resources
Is their a JavaScript Equivalent to PHP explode()?
The JavaScript equivalent to PHP explode() is split(). To get the data after the first colon, try to run the following code.
Example
<!DOCTYPE html> <html> <body> <script> var str = '087000764008:Rank:info:result'; var arr = str.split(":"); document.write(arr[1] + ":" + arr[2]); </script> </body> </html>
- Related Articles
- Is their a negative lookbehind equivalent in JavaScript?
- What is explode() function in PHP?
- explode() function in PHP
- Is there PHP basename() equivalent in MySQL?
- What is the PHP stripos() equivalent in MySQL?
- How can I remove all empty values when I explode a string using PHP?
- PHP equivalent of friend or internal
- What is the PHP equivalent of MySQL's UNHEX()?
- What is $(document).ready() equivalent in JavaScript?
- How to unnest (explode) a row in a pandas series?
- What is the equivalent of MySQL TIME_TO_SEC() method in PHP to convert datetime to seconds?
- How to assign a PHP variable to JavaScript?
- Is the !! (not not) operator in JavaScript equivalent to reverse process of not operator?
- JavaScript vs. PHP: Which is Easier?
- The ratio equivalent to 3:7 is

Advertisements