Hi! Could we please enable some services and cookies to improve your experience and our website?
Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code
<?php
$arr = [
1 => 'one',
'two' => 2,
3 => 'three'
];
$res = array_filter(
array_keys($arr),
fn($el) => is_numeric($el)
);
print_r($res);