<?php
include('includes/function.php');
$stmt = $pdo->prepare('
SELECT *
FROM tender_form_data
, tender_letter_com
WHERE tender_letter_com.comid = tender_form_data.comid
and tno="tt"
');
$stmt->execute();
$stampfile = $stmt->fetch(PDO::FETCH_ASSOC);
$sfile=$stampfile['itemname'];
$sfile=explode(" , ",$sfile);
$n=count($sfile);
for($i=0;$i<$n;$i++){
echo $sfile[$i].'<br>';
}
?>
i am using this html code for inserting array in database
Current Ouput:
item1
item2
item2
item1
item2
But i want only unique value like
item1
item2
Any suggestion will be helpful