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

What do you mean by core php?

491


Explain me how failures in execution are handled with include() and require() functions?

614


Is strcmp case sensitive?

521


Why would we use === instead of ==?

8357


Do you know how to enable error reporting in php?

495






Is age a variable in research?

492


What is cookie?

537


What is the difference between $_files['userfile']['name'] and $_files['userfile']['tmp_name']?

537


What is a namespace in php?

479


Is php outdated 2019?

513


How to repeat a string to a specific number of times in php?

530


How to redirect https to http url through .htaccess?

501


What is difference between variable declaration and variable definition?

505


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

571


What does $_ post mean in php?

596