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


Please Help Members By Posting Answers For Below Questions

What is the use of addslashes in php?

598


How does firefox manage cookies?

620


How do I update php?

655


Can you define an argument as a reference type?

621


Is nan in javascript?

612






What is chrome logger?

639


What are session variables in php?

590


How to move uploaded files to permanent directory?

624


How to run the interactive php shell from the command line interface?

659


Which is better php praogramming or cad/cam scope wise and also salaray wise?

1648


How many records can be stored in mysql table?

642


Is php fully object oriented?

565


How can we determine whether a variable is set?

598


What is the functionality of md5 function in php?

665


What is design pattern? Explain all including singleton pattern?

618