Hi! Could we please enable some services and cookies to improve your experience and our website?
Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code
<?php
$arr = ['Картошка','Капуста','Стакан','Енот','Ручка','Глобус','Книга'];
echo deleteLet($arr,"а");
function deleteLet($words, $letters){
if(is_array($words)){
$words = implode(" ", $words);
}
$result = str_replace($letters, "", $words);
$result = explode(" ", $result);
$result = json_encode($result, JSON_UNESCAPED_UNICODE);
return $result;
}