How to Delete an Array Element in PHP ?




Hello Friends,

In this blog, I will show you unset method in php. We will talk about php unset array example. This article will give how to delete an array element in php. We will show deleting an element from an array in php. I am going to learn you how to remove specific element from an array in php.

Here i will full example for php unset method so let's see the bellow example:



$lang = array("laravel", "php", "jquery", "nodejs", "boostrap");


while (list ($key,$val) = each ($lang)){

echo "$key -> $val <br>";




0 -> laravel

1 -> php

3 -> nodejs

4 -> boostrap

It will help you...