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
What are php data types?
How can we define a variable accessible in functions of a php script?
How many escape sequences are recognized in double-quoted strings?
How a variable is declared in php?
Write a program to find the factorial of a number in php?
How to get number of elements in an array?
How to return ascii value of character in php?
What is the difference between print() and echo() in PHP?
What is difference between strstr() and stristr()?
Does php support polymorphism?
Declare a new variable in php equal to the number 3;
How is session data stored?
What is difference between html and php?
What is smarty?
How can I use single quotes in single quotes in php?