I have an array $category['transactions']. It stores data as follow:
ID   Name  Phone
1   Test   Test2
2   Test3  Test4
It's because I use the same array for different purpose, at one of the scenario is to show only the first record in this array. I don't what to change the coding in php nor creating a different parameter. What can I improve based on the following coding in html to get the first record only in this array?
                    <?php foreach($category['transactions'] as $transaction) { ?>
                            <div><?php echo $transaction['id']; ?></div>
                            <div><?php echo $transaction['name']; ?></div>
                    <?php } ?>
 
     
     
    