As i switch to PHP7 I have problem (Uncaught Error: Call to undefined function ereg())
My question is how to change from preg_match, because when i change preg_match("[0-9]{1,2}",$head) I get output ........
My code below:
$prevodi = explode('@',$word['prevod']);
foreach ($zborovi as $zbor)
{
$atr = "";
echo '<div class="words">';
$tmpprev = $prevodi[$cnt];
$pred = preg_split("[.]",trim($tmpprev));
$len = strlen($tmpprev);
$cut = 0;
$lng = count($pred);
if ($lng > 1)
{
$cnt1 = 0;
while ($cnt1 < $lng-1)
{
$head = trim($pred[$cnt1]);
$cut = $cut + strlen($pred[$cnt1]) + 1;
$cnt1 = $cnt1 + 1;
if (preg_match("/\d{1,2}/", $head)) continue;
if (strpos($head,'(') === false || strpos($head,'(е)') !== false) $atr = $atr.$head.'. ';
}
}
echo '<span class="zbor_1">'.$zbor.'<span class="atribute"> '.$atr.'</span></span><br />';