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 / shaik abdul raheem

<?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';
unset($a[4]);
for($b=0;$b<=count($a);$b++)
{
echo $a[$b]."<br>";
}
?>

Is This Answer Correct ?    4 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is php case sensitive?

945


How will you calculate days between two dates in PHP?

1085


Tell me what is the difference between ereg_replace() and eregi_replace()?

1162


What is preg_match?

965


What are arguments in php?

1030


What the difference between the 'bitwise and' operator and the 'logical and' operator?

981


What is singleton pattern in php?

909


Tell me what are magic methods?

987


Is php worth learning in 2019?

916


What are the rules to determine the “truth” of any value which is not already of the boolean type?

960


Explain how is it possible to cast types in php?

984


How to protect special characters in query string?

975


What are the different filter functions used to filter a variable?

989


Can php run without apache?

1026


Why php is sometimes called as embedded scripting language?

962