I am assigned a task to revise a website and at present, I am working on index.html page. the previous coder has mixed a lot of JavaScript and CSS code in between and it is becoming difficult to read. …
Tag: html
Output text file with line breaks in PHP
I’m trying to open a text file and output its contents with the code below. The text file includes line breaks but when I echo the file its unformatted. How do I fix this? Thanks. <…
How to add anchor tag to a URL from text input
I want to be able to take user inputted text in a comment field and check for URL type expression, and if it exists, add an anchor tag (to url) when the comment is displayed. I am using PHP on the server-side, and Javascript (with jQuery) on client, so should I wait to check for URL until right before it
[HTML/CSS/JavaScript/PHP]: In which order code must be written?
While writing code in a file that would comprise of PHP, HTML, CSS & JavaScript, in what order each must appear? What are the best practices for separating the presentation and the logic? Sometimes external .js and other files are using in the link tag. Where these link tags must appear? Answer This doesn’t answer the question directly but the
is it possible to make “beep” sound in php like in gmail
for an IM script i am making, i would like the computer to beep like in gmail everytime there is a new message. is there a script in php or html to make the computer beep? Thanks! Answer All you need to do is load a small flash movie that makes the sound, you can easily toggle it in your
PHP “pretty print” HTML (not Tidy)
I’m using the DOM extension in PHP to build some HTML documents, and I want the output to be formatted nicely (with new lines and indentation) so that it’s readable, however, from the many tests I’ve …