substr($user['Tc'],2,6) bu komutu yazdıktan sonra bu komutu da str_repeat içine alıp deneyebilirsiniz: str_repeat("*", strlen(substr($user['Tc'],2,6)))