Question: here is some commands.

```
$filewithoutext = array("1F621", "1F536", "1F365", "1F33B", "1F193", "0035-20E3");
$changtofilename = str_replace($vowels, ".png", "1F536 1F621");

```

my requirement is if value find **(1F33B 1F193)** then system will change it to **.png** like **1F536.png 1F621.png**

Answer: 
try below solution:

```
<?php
$vowels = array("1F536", "1F621");
$array = array("1F621", "1F536", "1F365", "1F33B", "1F193", "0035-20E3");

$arr = array_map(function(&$val) use($vowels){
    $value = (in_array($val, $vowels) !== false) ? $val . '.png' : $val;
    return $value;
}, $array);

print_r($arr);

```

`$arr` will have desired result.
```
 $find = array('1F33B', '1F621');
    $replace = array('1F33B.png', '1F621.png');
    $filewithoutext = array("1F621", "1F536", "1F365", "1F33B", "1F193", "0035-20E3");
    $changtofilename = str_replace($find, $replace, $filewithoutext);

```