Sunday, 25 June 2017

70.array push

eg.
<?php $locationofroom=[];
if(!empty($propertyRequirementVillaData))
{
foreach ($propertyRequirementVillaData as $row)
{
$Roomtotalbhk = $Roomtotalbhk.$row['no_of_rooms'].'BHK'.',';
$Roomlocation=$Roomlocation.$row['state'].','.$row['city'].',';
if(!in_array($Roomlocation,$locationofroom)){
array_push($locationofroom,$Roomlocation);
   }
}
    }
   
   
    ?>

No comments:

Post a Comment