I have 10 elements of Array, how can i remove 5 array
element, with single function.
Answer Posted / dhir
<?php
$a[0]='a';
$a[1]='b';
$a[2]='c';
$a[3]='d';
$a[4]='f';
$a[5]='g';
$a[6]='h';
$a[7]='i';
for($b=0;$b<=4;$b++)
{
$a=shift($a[$b]);
}
?>
| Is This Answer Correct ? | 1 Yes | 3 No |
Post New Answer View All Answers
What is the purpose of php?
how to use http headers inside php? Write the statement through which it can be added?
Why php language is used?
What’s the special meaning of __sleep and __wakeup?
Explain about PHP cookies?
What is the difference between array_pop() and array_push()?
Is it possible to submit a form with a dedicated button?
What are the methods useful for method overloading?
is that "enumerated array" equal to "numeric array"?
What is the output of the ucwords function in this example?
Is php 7.0 stable?
Where php basically used?
Define object-oriented methodology?
How can you retrieve data from the mysql database using php?
What are major variables in research?