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

Why should I learn php?

512


What is static variable in php?

612


How to check whether a number is prime or not?

543


What is php mainly used for?

535


How to create reusable code in php?

550






What are the encryption functions in php?

569


Is runtime polymorphism overriding?

498


How can we encrypt the password using php?

554


Distinguish between urlencode and urldecode?

557


How do you display the output directly to the browser?

473


Explain what does the function get_magic_quotes_gpc() means?

521


Do you know how to declare an array in php?

546


How arrays are passed through arguments?

614


What does nan stand for computer science?

504


How can you get the size of an image in PHP?

548