- substr: documentation ( source)
<?php
$my_array = array();
$my_array['id'] = 4127 ;
$my_array['nick'] = 'Jonas';
$my_array['dte79855545'] = 5;
foreach ($my_array as $key => $value)
{
if (substr ( $key , 0 , 3 )=='dte')
{
$the_dte_id = substr ( $key , 3);
$the_dte_value = $value;
}
}
echo "The dte id is:".$the_dte_id." and the value is ".$the_dte_value;
?>