Remove Last Element from Array using PHP

array_pop function

<?php

$data = [10, 3, 17, 50, 15];
array_pop($data);

print_r($data);

Leave a Comment

Cancel reply

Your email address will not be published.