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 meaning of php?
How does php server work?
Explain the difference between array_merge() and array_combine()?
Is php dying 2018?
What is the difference between file_get_contents() and file_put_contents() in php?
Is it possible to use com component in php?
How to call a php function from another php file?
What is the difference between $message and $$message in php?
What is singleton pattern in php?
What is php date function?
What is the purpose of the following files having extensions: frm, myd, and myi? What these files contain?
What is __ construct in php?
What is the purpose of using php?
How is the comparison of objects done in php?
What is escaping to php?