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

Why do we use hooks?

490


Explain array_uintersect()?

557


Where are the persistent cookies stored on your computer?

549


How to create a mysql connection in php?

502


What is meant by MIME?

615






What is phpsessid?

495


What is basic php?

515


How to redirect https to http url through .htaccess?

478


How to get best php developer Experience in Php with Sugar CRM / VTiger.

3941


What is composer phar?

478


What is namespace in php?

535


What is the importance of "method" attribute in a html form?

527


What advance thing in php7?

504


What is isset and unset in php?

512


What are the differences between session and cookie?

501