php supprimer la chaîne du tableau
$index = array_search('string3',$array);
if($index !== FALSE){
unset($array[$index]);
}
Bismarck the divine
$index = array_search('string3',$array);
if($index !== FALSE){
unset($array[$index]);
}
array_diff( [312, 401, 15, 401, 3], [401] ) // removing 401 returns [312, 15, 3]
// https://stackoverflow.com/questions/7225070/php-array-delete-by-value-not-key#:~:text=with%20one%20element.-,array_diff(%20%5B312%2C%20401%2C%2015%2C%20401%2C%203%5D%2C%20%5B401%5D%20)%20//%20removing%20401%20returns%20%5B312%2C%2015%2C%203%5D,-It%20generalizes%20nicely