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 the interface in php?
Explain about getters and setters in php?
How stop the execution of a php scrip?
Hello Friends,I am seeking for a job in php having 9 months. exp.Please suggest any company openings.
What is csrf token and how will you add csrf token in ajax?
How to get best php developer Experience in Php with Sugar CRM / VTiger.
I need to know about the courses which are useful in corporate companies.. especially php/mySQL, Java/j2ee, .NET.. also tell if any other courses are valuable
When to use self over $this?
Tell me what is the use of "ksort" in php?
What is a php 5?
How do we get the current session id?
What is namespaces in PHP?
What are php functions?
What are examples of independent and dependent variables?
How to create a directory?