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
$a = [1, 4, 1, 3];
$b = [];
foreach ($a as $item) {
if (!in_array($item, $b, true)) {
$b[] = $item;
}
}
var_dump($b);