send hashtags to different columns in the mysql database

1

I would like to insert each hashtag word into a table column, I am using this example:

    <form name="formulario" method="post" enctype="multipart/form-data" action="">

    <input name="hashtag'" type="text"/>

    <input type="submit" value="enviar"/>

    </form>

    <?php
    if(isset($_POST)){

    $hashtag = $_POST['hashtag'];

        $ext = implode(",",$hashtag');
        var_dump($ext);

        /*resultado da impressão:
        string '#tag1,#tag2' (length=20)
        */

                $insert = DB::getConn()->prepare('INSERT INTO 'table' SET 'hashtag'=?');
                return $insert->execute(array($ext)) ? 1 : 0;

    }

In the mysql database resulted

         id|1|hashtag|#tag1,#tag2

I would like each word to be inserted into a column:

         id|1|hashtag|#tag1
         id|2|hashtag|#tag2         
    
asked by anonymous 01.05.2016 / 09:57

0 answers