This are two lines of codes. Could anyone tell me what the difference is between the first way and the second? I'd like both to do exactly the same thing.
$test = isset($_POST['test'])?$_POST['test']:[];
if(isset($_POST['test'])){
$test[] = $_POST['test'];
}
Thanks !