You could just do 1 query, using OR
in your WHERE
<?php
include('db.php');
$result = mysqli_query($con,"SELECT * FROM Aplicatie WHERE id_usr_1 = '10000583221231' OR id_usr_2 = '10000583221233' ORDER BY date");
while($row = mysqli_fetch_array($result))
{
$arrows = ($row['id_usr_1'] == '10000583221231') ? " --> " : " <-- ";
echo $row['id_usr_1'] . $arrows . $row['id_usr_2'] . $arrows . $row['date'];
echo "<br>";
}
?>