CopyPastor

Detecting plagiarism made easy.

Score: 0.8645621120706479; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2018-04-02
by KRIPS

Original Post

Original - Posted on 2009-07-01
by Gumbo



            
Present in both answers; Present only in the new answer; Present only in the old answer;

You could use couner:
<?php $i = 0; $len = count($array); foreach ($array as $item) { if ($i == 0) { // first } else if ($i == $len - 1) { // last } // … $i++; } ?>
You could use a counter:
$i = 0; $len = count($array); foreach ($array as $item) { if ($i == 0) { // first } else if ($i == $len - 1) { // last } // … $i++; }

        
Present in both answers; Present only in the new answer; Present only in the old answer;