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
Write down the benefits of php7?
Explain me soundex() and metaphone()?
What is regex in html?
Can php run without server?
Is it possible to destroy a cookie?
How to change the principal password?
What is $_ get in php?
What are the methods to submit form in php?
Does php have a future?
Explain what are psrs?
Why sessions are used in php?
What is a string in r?
What is zend studio for?
Why is facebook still using php?
How to access standard error stream in PHP?