- print_r: documentation ( source)
<?php
$hire = array(
'hiring' => array(
(int) 1 => '10',
(int) 2 => '5',
(int) 3 => '8',
(int) 4 => '15'
)
);
$a=[];
foreach($hire['hiring'] as $key=>$value) {
$a[$key] = (int)$value;
}
print_r($a);