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

Explain about getters and setters in php?

1069


Explain what are psrs?

954


Describe which programming language does php parallel to?

985


How can you get web browser’s details using PHP?

969


Which MySQL function would you use to select a database?

1062


What is mean tnq

1542


What is default session time and path in php?

1061


Which function will you use to create an array?

968


Tell us what does $_cookie means?

996


What changes I have to do in php.ini file for file uploading?

1071


What is stripslashes php?

963


How many data types are used by php?

986


How do you pass a variable by value?

1065


How is the comparison of objects done in php?

934


What is http get and post?

1008