Check If Last Item In Foreach Php Code Example Get link Facebook X Pinterest Email Other Apps April 06, 2019 Example: php foreach if last item$numItems = count($arr);$i = 0;foreach($arr as $key=>$value) { if(++$i === $numItems) { echo "last index!"; }} Get link Facebook X Pinterest Email Other Apps Comments
Comments
Post a Comment