<?php $input = '<input type="text" />'; $tip = preg_match('#<input type="(.*?)" />#si', $input, $cikti); echo $cikti[1]; ?>