- array_search: documentation ( source)
<?php
echo array_search(
'image/svg+xml',
array(
'jpg' => 'image/jpeg',
'png' => 'image/png',
'svg' => 'image/svg+xml',
'svg' => 'text/html',
'svg' => 'text/plain',
'gif' => 'image/gif'
),
true
);