How to remove tags from data in the database?
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
add a comment |
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
1
Have you tried anything yet? If so, please post the code and where it fails. Why insertn
andt
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
add a comment |
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
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
php
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 insertn
andt
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
add a comment |
1
Have you tried anything yet? If so, please post the code and where it fails. Why insertn
andt
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
add a comment |
3 Answers
3
active
oldest
votes
use preg_split
$output = preg_split( "/ (/n|/t) /", $input );
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
add a comment |
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()
add a comment |
item = item.replace(/<(.|n)*?>/g, '');
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
use preg_split
$output = preg_split( "/ (/n|/t) /", $input );
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
add a comment |
use preg_split
$output = preg_split( "/ (/n|/t) /", $input );
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
add a comment |
use preg_split
$output = preg_split( "/ (/n|/t) /", $input );
use preg_split
$output = preg_split( "/ (/n|/t) /", $input );
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
add a comment |
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
add a comment |
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()
add a comment |
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()
add a comment |
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()
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()
answered Dec 31 '18 at 10:10
RamRam
397
397
add a comment |
add a comment |
item = item.replace(/<(.|n)*?>/g, '');
add a comment |
item = item.replace(/<(.|n)*?>/g, '');
add a comment |
item = item.replace(/<(.|n)*?>/g, '');
item = item.replace(/<(.|n)*?>/g, '');
answered Dec 31 '18 at 11:17
mahesh talaviyamahesh talaviya
94
94
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
1
Have you tried anything yet? If so, please post the code and where it fails. Why insert
n
andt
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