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

<?php
$a[0]='a';
$a[1]='b';
$a[2]='c';
$a[3]='d';
$a[4]='f';
$a[5]='g';
$a[6]='h';
$a[7]='i';

for($b=0;$b<=4;$b++)
{
$a=shift($a[$b]);
}
?>

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of php?

966


how to use http headers inside php? Write the statement through which it can be added?

1027


Why php language is used?

982


What’s the special meaning of __sleep and __wakeup?

1023


Explain about PHP cookies?

1060


What is the difference between array_pop() and array_push()?

1221


Is it possible to submit a form with a dedicated button?

922


What are the methods useful for method overloading?

1024


is that "enumerated array" equal to "numeric array"?

2514


What is the output of the ucwords function in this example?

1024


Is php 7.0 stable?

931


Where php basically used?

1011


Define object-oriented methodology?

1039


How can you retrieve data from the mysql database using php?

1042


What are major variables in research?

1006