How to remove tags from data in the database?












-1















So I have inserted data in the database that contains n and t. How can I display on the webpage with PHP without n and t appearing on the data to be displayed?










share|improve this question




















  • 1





    Have you tried anything yet? If so, please post the code and where it fails. Why insert n and t anyway if you don't need them? Also: no caps, please

    – kerbholz
    Dec 31 '18 at 9:51













  • After reading this book, you’ll be able to do a whole lot more. –Dirk Schreckmann, JavaRanch Sheriff and Journal Editor Let Beginning JSP 2 be your guide as you begin using JSP. This comprehensive guide starts by steering you through your first JSP application. It reviews HTML, and provides you with a useful overview of JSP. You’ll then be ready to start learning one of the core techniques in JSP: pulling data from a database and working with that data. When i want to display these two paragraphs separately its not working and it displays /n and /t within the content displayed

    – ALan Alan
    Dec 31 '18 at 10:03
















-1















So I have inserted data in the database that contains n and t. How can I display on the webpage with PHP without n and t appearing on the data to be displayed?










share|improve this question




















  • 1





    Have you tried anything yet? If so, please post the code and where it fails. Why insert n and t anyway if you don't need them? Also: no caps, please

    – kerbholz
    Dec 31 '18 at 9:51













  • After reading this book, you’ll be able to do a whole lot more. –Dirk Schreckmann, JavaRanch Sheriff and Journal Editor Let Beginning JSP 2 be your guide as you begin using JSP. This comprehensive guide starts by steering you through your first JSP application. It reviews HTML, and provides you with a useful overview of JSP. You’ll then be ready to start learning one of the core techniques in JSP: pulling data from a database and working with that data. When i want to display these two paragraphs separately its not working and it displays /n and /t within the content displayed

    – ALan Alan
    Dec 31 '18 at 10:03














-1












-1








-1








So I have inserted data in the database that contains n and t. How can I display on the webpage with PHP without n and t appearing on the data to be displayed?










share|improve this question
















So I have inserted data in the database that contains n and t. How can I display on the webpage with PHP without n and t appearing on the data to be displayed?







php






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 31 '18 at 9:53









MLavoie

7,07672543




7,07672543










asked Dec 31 '18 at 9:46









ALan AlanALan Alan

1




1








  • 1





    Have you tried anything yet? If so, please post the code and where it fails. Why insert n and t anyway if you don't need them? Also: no caps, please

    – kerbholz
    Dec 31 '18 at 9:51













  • After reading this book, you’ll be able to do a whole lot more. –Dirk Schreckmann, JavaRanch Sheriff and Journal Editor Let Beginning JSP 2 be your guide as you begin using JSP. This comprehensive guide starts by steering you through your first JSP application. It reviews HTML, and provides you with a useful overview of JSP. You’ll then be ready to start learning one of the core techniques in JSP: pulling data from a database and working with that data. When i want to display these two paragraphs separately its not working and it displays /n and /t within the content displayed

    – ALan Alan
    Dec 31 '18 at 10:03














  • 1





    Have you tried anything yet? If so, please post the code and where it fails. Why insert n and t anyway if you don't need them? Also: no caps, please

    – kerbholz
    Dec 31 '18 at 9:51













  • After reading this book, you’ll be able to do a whole lot more. –Dirk Schreckmann, JavaRanch Sheriff and Journal Editor Let Beginning JSP 2 be your guide as you begin using JSP. This comprehensive guide starts by steering you through your first JSP application. It reviews HTML, and provides you with a useful overview of JSP. You’ll then be ready to start learning one of the core techniques in JSP: pulling data from a database and working with that data. When i want to display these two paragraphs separately its not working and it displays /n and /t within the content displayed

    – ALan Alan
    Dec 31 '18 at 10:03








1




1





Have you tried anything yet? If so, please post the code and where it fails. Why insert n and t anyway if you don't need them? Also: no caps, please

– kerbholz
Dec 31 '18 at 9:51







Have you tried anything yet? If so, please post the code and where it fails. Why insert n and t anyway if you don't need them? Also: no caps, please

– kerbholz
Dec 31 '18 at 9:51















After reading this book, you’ll be able to do a whole lot more. –Dirk Schreckmann, JavaRanch Sheriff and Journal Editor Let Beginning JSP 2 be your guide as you begin using JSP. This comprehensive guide starts by steering you through your first JSP application. It reviews HTML, and provides you with a useful overview of JSP. You’ll then be ready to start learning one of the core techniques in JSP: pulling data from a database and working with that data. When i want to display these two paragraphs separately its not working and it displays /n and /t within the content displayed

– ALan Alan
Dec 31 '18 at 10:03





After reading this book, you’ll be able to do a whole lot more. –Dirk Schreckmann, JavaRanch Sheriff and Journal Editor Let Beginning JSP 2 be your guide as you begin using JSP. This comprehensive guide starts by steering you through your first JSP application. It reviews HTML, and provides you with a useful overview of JSP. You’ll then be ready to start learning one of the core techniques in JSP: pulling data from a database and working with that data. When i want to display these two paragraphs separately its not working and it displays /n and /t within the content displayed

– ALan Alan
Dec 31 '18 at 10:03












3 Answers
3






active

oldest

votes


















0














use preg_split



$output = preg_split( "/ (/n|/t) /", $input );





share|improve this answer
























  • its not working,am trying to display two paragraphs from database results but the output just contains n and t no separate paragraphs

    – ALan Alan
    Dec 31 '18 at 10:05











  • better you have to use explode like as follow

    – Ram
    Dec 31 '18 at 10:07



















0














use explode
if consider your answer from db is



$input="hai /n hello /t";
$output1=explode('/n',$input);
$output=explode('/t',$output1);


it's working if result within foreach you may add this line into foreach()






share|improve this answer































    0














    item = item.replace(/<(.|n)*?>/g, '');






    share|improve this answer























      Your Answer






      StackExchange.ifUsing("editor", function () {
      StackExchange.using("externalEditor", function () {
      StackExchange.using("snippets", function () {
      StackExchange.snippets.init();
      });
      });
      }, "code-snippets");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "1"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53985961%2fhow-to-remove-tags-from-data-in-the-database%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      use preg_split



      $output = preg_split( "/ (/n|/t) /", $input );





      share|improve this answer
























      • its not working,am trying to display two paragraphs from database results but the output just contains n and t no separate paragraphs

        – ALan Alan
        Dec 31 '18 at 10:05











      • better you have to use explode like as follow

        – Ram
        Dec 31 '18 at 10:07
















      0














      use preg_split



      $output = preg_split( "/ (/n|/t) /", $input );





      share|improve this answer
























      • its not working,am trying to display two paragraphs from database results but the output just contains n and t no separate paragraphs

        – ALan Alan
        Dec 31 '18 at 10:05











      • better you have to use explode like as follow

        – Ram
        Dec 31 '18 at 10:07














      0












      0








      0







      use preg_split



      $output = preg_split( "/ (/n|/t) /", $input );





      share|improve this answer













      use preg_split



      $output = preg_split( "/ (/n|/t) /", $input );






      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Dec 31 '18 at 9:49









      RamRam

      397




      397













      • its not working,am trying to display two paragraphs from database results but the output just contains n and t no separate paragraphs

        – ALan Alan
        Dec 31 '18 at 10:05











      • better you have to use explode like as follow

        – Ram
        Dec 31 '18 at 10:07



















      • its not working,am trying to display two paragraphs from database results but the output just contains n and t no separate paragraphs

        – ALan Alan
        Dec 31 '18 at 10:05











      • better you have to use explode like as follow

        – Ram
        Dec 31 '18 at 10:07

















      its not working,am trying to display two paragraphs from database results but the output just contains n and t no separate paragraphs

      – ALan Alan
      Dec 31 '18 at 10:05





      its not working,am trying to display two paragraphs from database results but the output just contains n and t no separate paragraphs

      – ALan Alan
      Dec 31 '18 at 10:05













      better you have to use explode like as follow

      – Ram
      Dec 31 '18 at 10:07





      better you have to use explode like as follow

      – Ram
      Dec 31 '18 at 10:07













      0














      use explode
      if consider your answer from db is



      $input="hai /n hello /t";
      $output1=explode('/n',$input);
      $output=explode('/t',$output1);


      it's working if result within foreach you may add this line into foreach()






      share|improve this answer




























        0














        use explode
        if consider your answer from db is



        $input="hai /n hello /t";
        $output1=explode('/n',$input);
        $output=explode('/t',$output1);


        it's working if result within foreach you may add this line into foreach()






        share|improve this answer


























          0












          0








          0







          use explode
          if consider your answer from db is



          $input="hai /n hello /t";
          $output1=explode('/n',$input);
          $output=explode('/t',$output1);


          it's working if result within foreach you may add this line into foreach()






          share|improve this answer













          use explode
          if consider your answer from db is



          $input="hai /n hello /t";
          $output1=explode('/n',$input);
          $output=explode('/t',$output1);


          it's working if result within foreach you may add this line into foreach()







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 31 '18 at 10:10









          RamRam

          397




          397























              0














              item = item.replace(/<(.|n)*?>/g, '');






              share|improve this answer




























                0














                item = item.replace(/<(.|n)*?>/g, '');






                share|improve this answer


























                  0












                  0








                  0







                  item = item.replace(/<(.|n)*?>/g, '');






                  share|improve this answer













                  item = item.replace(/<(.|n)*?>/g, '');







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Dec 31 '18 at 11:17









                  mahesh talaviyamahesh talaviya

                  94




                  94






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53985961%2fhow-to-remove-tags-from-data-in-the-database%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Monofisismo

                      Angular Downloading a file using contenturl with Basic Authentication

                      Olmecas