I have 10 elements of Array, how can i remove 5 array
element, with single function.
Answer Posted / shaik abdul raheem
<?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';
unset($a[4]);
for($b=0;$b<=count($a);$b++)
{
echo $a[$b]."<br>";
}
?>
| Is This Answer Correct ? | 4 Yes | 5 No |
Post New Answer View All Answers
What is the current stable version of php? What advance thing in php7?
Write a program to upload a file in php?
How can you pass a variable by reference?
What is php data type?
Steps for the payment gateway processing?
Explain type casting and type juggling.
Tell me what does the scope of variables means?
What is cookie?
How to convert numbers to strings in php?
How can we display information of a variable and readable by human with php?
What is meant by ‘passing the variable by value and reference' in php?
What is the output of the following php code?
What is php rest api?
What is php programming used for?
What is stdclass in php?