Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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>Advertisements