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 meaning of php?

925


How does php server work?

1019


Explain the difference between array_merge() and array_combine()?

976


Is php dying 2018?

946


What is the difference between file_get_contents() and file_put_contents() in php?

1162


Is it possible to use com component in php?

970


How to call a php function from another php file?

967


What is the difference between $message and $$message in php?

997


What is singleton pattern in php?

884


What is php date function?

1060


What is the purpose of the following files having extensions: frm, myd, and myi? What these files contain?

949


What is __ construct in php?

985


What is the purpose of using php?

1035


How is the comparison of objects done in php?

920


What is escaping to php?

957