I have this:
15_some_text_or_numbers;
I want to get whats in front of the first underscore. There is always a letter directly after the fir
preg_match('/^(\d+)/', $yourString, $matches);
$matches[1] will hold your value
$matches[1]