- substr: documentation ( source)
- strpos: documentation ( source)
- print_r: documentation ( source)
<?php
$type = '';
$index = -1;
$t = "audio/x-wav-chunk; index=10";
$_p = strpos($t, ';');
if ($_p !== false)
$type = substr($t, 0, $_p);
$_p = strpos($t, 'index=');
if ($_p !== false)
$index = (int)substr($t, $_p + 6);
print_r($type);
print_r($index);