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
Explain about getters and setters in php?
Explain what are psrs?
Describe which programming language does php parallel to?
How can you get web browser’s details using PHP?
Which MySQL function would you use to select a database?
What is mean tnq
What is default session time and path in php?
Which function will you use to create an array?
Tell us what does $_cookie means?
What changes I have to do in php.ini file for file uploading?
What is stripslashes php?
How many data types are used by php?
How do you pass a variable by value?
How is the comparison of objects done in php?
What is http get and post?