- var_dump: documentation ( source)
- strtoupper: documentation ( source)
<?php
$array = array(
'fromWeightkg',
'toWeightkg',
'value',
1,
0,
'1',
'0',
);
foreach ($array as $value) {
var_dump(gr($value));
}
function gr($str) {
$str[0] = strtoupper($str[0]);
return $str;
}