/    Sign up×
Community /Pin to ProfileBookmark

nlb2r, is_html = false, by default

Is there any way to set the second parameter in nl2br to false by default.
Either by php.ini or by some define() value.

Any help is appreciated.

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@NogDogSep 27.2009 — To the best of my knowledge, the only way would be to change the C source code and recompile PHP.

Just for clarification of what may simply be a typo in your post, the 2nd arg is is_[b]x[/b]html, and its default setting of true has the function continue to perform the same way as it has since PHP 4.0.5 (defaulting to "<br />" instead of "<br>").
Copy linkTweet thisAlerts:
@QuidamauthorSep 27.2009 — To the best of my knowledge, the only way would be to change the C source code and recompile PHP.

Just for clarification of what may simply be a typo in your post, the 2nd arg is is_[b]x[/b]html, and its default setting of true has the function continue to perform the same way as it has since PHP 4.0.5 (defaulting to "<br />" instead of "<br>").[/QUOTE]


Yes, I meant is_xhtml, sorry.

Thanks for the info though, I know some functions could have the default values changed, so I thought I'd give it a shot.
×

Success!

Help @Quidam spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...