Array
(
[1] => Array
(
[0] => Textttttttttttttttttt Falseeeeeeeeee
[1] =>
INFO .......................................
)
)
for ($ke= 0; $ke <= count($ins['Raspunsurile'][0]);$ke++) {
if (strpos($ins['Raspunsurile'][0][$ke], 'Textttttttttttttttttt Falseeeeeeeeee') !== false)
{
unset($ins['Raspunsurile'][0][$ke]);
}
}
$data = array(
'Lorem',
array(
'Lorem',
'ipsum',
'dolor',
),
'sit',
'amet',
array(
'consectetur',
'adipisicing',
'elit',
'Lorem',
),
);
function removeItems($data, $search) {
foreach ($data as $key => $value) {
if ( is_array($value) ) {
$data[$key] = removeItems($value, $search);
} else {
if (strpos($value, $search) !== false) {
unset($data[$key]);
}
}
}
return $data;
}
print_r(removeItems($data, 'Lorem'));
$array = [
0 => ['0'],
1 => ['1'],
2 => ['2'],
3 => ['3'],
4 => ['4'],
5 => ['Textttttttttttttttttt Falseeeeeeeeee'],
];
$re = '/Text+ False+/';
for ( $i = 0; $i <= count($array); $i++ ) {
foreach ($array[$i] as $item) {
preg_match_all($re, $item, $matches);
if( print_r($matches) ) {
unset($array[$i]);
}
}
}