PHP print MySQL Database array length count calculator


PHP mysql database show multi dimensional array get comma separated string value  array length count calculator with for loop in php How to convert and display column list to comma separated list show How to display and show Array to Comma-Separated String in PHP


$list = array("Volvo", "BMW", "Toyota");

$list = array("Volvo", "BMW", "Toyota");

 <?php  $list = $row['passwordid'];  

$array = explode("-",$list);

         foreach($array as $varchar){

         echo $varchar."<br/>";

        }   ?>


2nd type  

<?php $listcount = $row['passwordid'];  

        $arraya = explode("-",$listcount); 

       // $cars = array("Volvo", "BMW", "Toyota");

$arrlength = count($arraya);

echo $arrlength;

for($x = 0; $x < $arrlength; $x++) {

echo $arraya[$x];

echo "<br>";