Images

<img border=”0″ src=”mypicture.png” width=”80″ height=”80″ alt=”SomeText” />

Read More →

Duration

Convert Seconds To Duration Time Format $seconds_input = $video_duration; //The value in seconds (e.g. 1568.782) $hours = (int)(($minutes = (int)($seconds = (int)($milliseconds = (int)($seconds_input * 1000)) / 1000) / 60) / 60); $duration_string = $hours.’:’.($minutes%60).’:’.($seconds%60).((($milliseconds%1000) === 0) ? ” : ‘.’.rtrim($milliseconds%1000, ‘0’));

Read More →

Creating Debug Output File

This will write / overwrite a file called test.txt in the local directory of the php file. You may need to create thr file first and enable write permissions for it to work. $data = “START-“.strftime(‘%c’).”-START”; $file = “test.txt”; $fp = fopen($file, “w”) or die(“Couldn’t open file for writing!”); fwrite($fp, $data) or die(“Couldn’t write values […]

Read More →

Wrapping

Stopping Text Wrapping & Overflowing Allow Wrapping But No Overflow Allow a really long word to be broken if necessary fit in available width

Read More →

Multiple background images

Multiple horizontal background images with transparent png’s Multiple vertical background images with transparent png’s Doing this won’t work because the repeat-y will cause the middle image to fill the whole height, no matter where it is positioned initially: Solution A nice solution is to push the repeating background into a pseudo element positioned off of […]

Read More →

Tables

HTML <table id=”my_table”> CSS table#my_table { border-collapse:none; width:100% } table#my_table td { margin: 1px; color: #000; padding: 2px 1px; text-align: center; font-weight: bold; } table#my_table td a:hover { text-decoration:none; }

Read More →

.Form General

Simple form: Submit to same page, see here onSubmit E.g. onSubmit=”return capCheck(this);” means call the javascript function called capCheck PHP Handle Form

Read More →

Select Box

Causing Form To Submit OnChange Loading With Selected Setting From PHP – Using an array PHP HTML Auto submit select box form example PHP HTML Doing specific things Get selected item text

Read More →