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 difference between static and constant?
The left association operator % is used in PHP for?
What does $globals mean?
How will you calculate days between two dates in PHP?
What is the use of htmlentities in php?
Does apache use php?
How cookies are trported from browsers to servers?
What is strcmp () in php?
Is gender a dependent variable?
Tell me how is it possible to parse a configuration file?
What does php exit do?
Explain whether it is possible to share a single instance of a memcache between multiple php projects?
Can we embedded directly PHP code into XHTML document? State Whether True or False?
What is php's mysqli extension?
Do while loops php?