I have 10 elements of Array, how can i remove 5 array
element, with single function.
Answer Posted / vepurnaresh
Hi guys...this is one of the answer i found and tested in my
dreamweaver make use of it....
<?php
$a = array('a','b','c','d','f','g','h','i','j','k');
array_splice($a, 0, 5);
for($b=0;$b<=count($a);$b++)
{
echo $a[$b]."<br>";
}
?>
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain scalar type declarations in php7?
How do I stop a php script?
Explain some of the php array functions?
What is the importance of "action" attribute in a html form?
What is the maximum size of a table in mysql?
Tell me what does the php error 'parse error in php - unexpected t_variable at line x' means?
What are the methods useful for method overloading?
Tell me how to retrieve a cookie value?
How to calculate the difference between two dates using php?
What is singleton design pattern in php?
List functions available to sort an php array?
What percentage of websites use php?
What are the advantages of indexes?
How can you execute php script from the command line?
How can you associate a variable with a session?