Articles about splice

Helping you solve those tough coding problems since 2009!

Deleting an element from an array in PHP

Published on Jan 26, 2020

There are multiple ways to delete an element from array with PHP: unset, array_splice, and array_diff. The splice method is very similar to my article on removing a specific element with JavaScript article.

JavaScript - Remove a specific element from an array

Published on Feb 7, 2019

It's quite often that I have an array of elements and when a certain condition happens that I need to remove a particular element from my JavaScript array. Let's explore how indexOf and splice accomplish this.

Tutorials

Learn how to code in HTML, CSS, JavaScript, Python, Ruby, PHP, Java, C#, SQL, and more.

No matter the programming language you're looking to learn, I've hopefully compiled an incredible set of tutorials for you to learn; whether you are beginner or an expert, there is something for everyone to learn. Each topic I go in-depth and provide many examples throughout. I can't wait for you to dig in and improve your skillset with any of the tutorials below.