Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

I have 10 elements of Array, how can i remove 5 array
element, with single function.

Answer Posted / vaneet badhan

$a=array(2,4,1,3,22,15);

for($v=0;$v<=4;$v++)
{
unset($a[$v]);
}

This code will remove elements "2,4,1,3,22" from array $a
and the output will be : "15"

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between variable declaration and variable definition?

963


Tell me what is htaccess?

916


What is the difference between die () and exit () in php?

980


Tell me can the value of a constant change during the script's execution?

1265


Tell me what is the main difference between require() and require_once()?

978


What is php and what does it do?

1051


What is alias in php?

1022


Can I use node js with php?

1027


Is php developer in demand?

960


What does a special set of tags do in php?

920


What is a class in php programing?

2562


How to read and display a HTML source from the website url?

969


What is the best way to avoid email sent through php getting into the spam folder?

985


what is mean by portal

2030


How does api connect to database?

1057