I have 10 elements of Array, how can i remove 5 array
element, with single function.

Answer Posted / vipul dalwala

$a = array('a','b','c','d','f','g','h','i','j','k');

array_splice($a, 0, 5);

Is This Answer Correct ?    12 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the changes in php versions?

618


What is the difference between print() and echo()?

662


What is the difference between characters 23 and x23?

632


Which array function checks if the particular key exists in the array?

579


Describe which programming language does php parallel to?

560






Which is not a file-related function in php?

701


What is meant by pear in php? What is the purpose of it?

596


How do http requests work?

569


What is the difference between laravel and php?

572


What is $_ request?

601


What are the disadvantages of php?

589


Does php need a closing tag?

625


What is csrf verification?

621


What happens when submit button is clicked?

598


what is benefit of magento?

2126