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 / phani

$output = array_splice($input, 0, 5));

print_r($output);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to include a file to a PHP page?

1129


What are the main error types in php and how do they differ?

1374


Can I learn php without knowing c?

1069


What are new features in php 7?

1067


What is the use of "ksort" in php?

985


What is full form of php? Who is the father or inventor of php?

1053


Does mysql need php?

974


Is php used anymore?

1027


What can php do?

1071


What are the 5 types of variables?

1079


What percentage of websites use php?

1042


What is mysql in php?

982


How to access a global variable inside a function?

1055


Explain me is multiple inheritance supported in php?

1110


What is global array in php?

1124