I have 10 elements of Array, how can i remove 5 array
element, with single function.
Answer Posted / vaneet badhan
$a=array(2,4,1,3,22,15);
for($v=0;$v<=4;$v++)
{
unset($a[$v]);
}
This code will remove elements "2,4,1,3,22" from array $a
and the output will be : "15"
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
How do sessions work in php?
Which is faster for or foreach php?
What is the most common http method?
What are the 5 types of data?
Hello Friends,I am seeking for a job in php having 9 months. exp.Please suggest any company openings.
What is null value in php?
How can we display information of a variable and readable by a human with php?
What does trim () do in javascript?
Tell me what type of operation is needed when passing values through a form or an url?
What is php and features of php?
What are php data types?
How to Retrieve a Cookie Value?
What is the difference between characters 34 and x34?
Explain me how to include a file to a php page?
what is variable scope, which variables are accessible from where and what are "undefined variable" errors?