How do you disable browser Autocomplete on web form field / input tag?

Problem:

You create a form for users in your page.  When a user starts to fill the form, by default, the browser shows options to fill in the field, based on earlier typed values. You need to disable this displaying option. Continue reading How do you disable browser Autocomplete on web form field / input tag?

How to Remove Line Breaks from a String in PHP?

Problem:

Suppose you’ve got a long text message from user input. When you display it properly(using nl2br() function) in PHP, it adds line breaks(see below). If you see the browser’s source code, you find that the browser has added <br> or <br /> tag at the end of each line. Now, you want to remove all those line breaks and print all the texts in one line. So, there would be no <br > or <br /> tag. Continue reading How to Remove Line Breaks from a String in PHP?