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
What is difference between variable declaration and variable definition?
Tell me what is htaccess?
What is the difference between die () and exit () in php?
Tell me can the value of a constant change during the script's execution?
Tell me what is the main difference between require() and require_once()?
What is php and what does it do?
What is alias in php?
Can I use node js with php?
Is php developer in demand?
What does a special set of tags do in php?
What is a class in php programing?
How to read and display a HTML source from the website url?
What is the best way to avoid email sent through php getting into the spam folder?
what is mean by portal
How does api connect to database?