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

Tell me how can we get the error when there is a problem to upload a file?

1005


Why do we use interface in php?

973


What is difference between static and constant in php?

1008


What is isset function in php?

1195


How can we create a database using php?

1127


What is the use of mysql_real_escape_string() function?

940


Which variable declarations within a class is invalid in php?

981


How do I install php and apache on windows 10?

1077


How do I run php?

993


Could we start a variable with number like $4name?

921


How many ways to include array elements in double-quoted strings using php?

1057


What is x+ mode in fopen() used for?

1060


What are the four scalar types of php?

1126


How to make database connection in php?

1043


How do I know my xampp version?

1011