function ceros($cadena) { if( preg_match("/0([^0])/", $cadena, $match) ) { return strpos($cadena, $match[1]); } else { return 0; } }