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

Hi guys...this is one of the answer i found and tested in my
dreamweaver make use of it....

<?php

$a = array('a','b','c','d','f','g','h','i','j','k');

array_splice($a, 0, 5);

for($b=0;$b<=count($a);$b++)
{
echo $a[$b]."<br>";
}
?>

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain scalar type declarations in php7?

906


How do I stop a php script?

909


Explain some of the php array functions?

1019


What is the importance of "action" attribute in a html form?

970


What is the maximum size of a table in mysql?

946


Tell me what does the php error 'parse error in php - unexpected t_variable at line x' means?

939


What are the methods useful for method overloading?

972


Tell me how to retrieve a cookie value?

948


How to calculate the difference between two dates using php?

986


What is singleton design pattern in php?

925


List functions available to sort an php array?

911


What percentage of websites use php?

935


What are the advantages of indexes?

867


How can you execute php script from the command line?

954


How can you associate a variable with a session?

960