1

i have two tables, one separates tags by comma, the other converts similar tags to single tags.

example:

The exploded tags table I got in the database:

<?php  
  
 foreach ($result as $row) {
     
     $explode = explode(",",$row["turler"]);
    ?>
  
 <?php   foreach ($explode as $exp) {
  ?> 
  <?= $exp ;?> 
   
    <?php 
  } }?>

The table I want to adapt and put into an array:

         <?php
$vturler=array("tag1","tag2","tag2","tag3","tag1");
$tur = array_unique($vturler);

   foreach( $tur as $vturler ) { ?> 
        <?php echo "$vturler";?>
                               
  <?php  } ?> 

I want to combine these two. I want to enclose the "explode" values in the first table into the "array" in the bottom table.

Progman
  • 16,827
  • 6
  • 33
  • 48
  • You might want to look at https://stackoverflow.com/questions/3653462/is-storing-a-delimited-list-in-a-database-column-really-that-bad – Progman Apr 07 '23 at 13:06

0 Answers0