Fri, 17 May 2024


How to get all the keys of an PHP array?

By: Anton, NetArt Media
Sat, 27 February 2021

<?php

$arr=array(2=>"netart"),5=>"media";

array_keys($arr); //will return array(2,5)

?>


Category: PHP Examples
Share this post:



See All Scripts






Subscribe for our newsletter

Receive the latest blog posts direct in your mailbox