Skip to content

Tag: html

PHP, WordWrap how to cut only text and don’t cut html code

i have a problem. I have to use the wordwrap function to not go too far with the text in a table. I inserted wordwrap and it worked fine but now that I also have to insert some html code I have a problem. The wordwrap function cuts my html code (for example span cuts it to me in sp

PHP not executing a shell exec command

To keep this simple this code works: And this code code doesn’t: Does anyone know how I can get the code that doesn’t work to work? I have ran the command in a normal terminal and they execute as expected, but when ran with PHP it cause a server 500 error – this seems to require a PHP code r…

Using JS variable as the property of HTML input Form

I have a form which have two field “optin” and “Qty”.The quantity field of the form accept the number.The minimum number which can be entered in this field(QTY) depends upon the the value of the Option field i.e. If the option fiels value is red then the minimum value propert of the Qt…

Randomly Show an HTML Snippet From List With PHP

As the title implies, I have a few different lines of HTML code (Example Below), and I would like the server to randomly select one and show it when the page loads. I have these three HTML snippets, and I want one to randomly show when the page is loaded. I found this example using the PHP array function, but