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

How do sessions work in php?

963


Which is faster for or foreach php?

918


What is the most common http method?

1042


What are the 5 types of data?

959


Hello Friends,I am seeking for a job in php having 9 months. exp.Please suggest any company openings.

2082


What is null value in php?

1000


How can we display information of a variable and readable by a human with php?

938


What does trim () do in javascript?

988


Tell me what type of operation is needed when passing values through a form or an url?

918


What is php and features of php?

935


What are php data types?

948


How to Retrieve a Cookie Value?

1139


What is the difference between characters 34 and x34?

987


Explain me how to include a file to a php page?

931


what is variable scope, which variables are accessible from where and what are "undefined variable" errors?

1016