Online Promoters™ :: Web Development made simple

Blog

Replace ( parentheses ) with PHP Parenthesis Regex

As I could not find a proper way to remove parenthesis from a string I came to the following solution: The best way until today® is to use preg_replace $str = 'Hard Disk (HDD)'; $job = preg_replace('/([()]+)/i' ,'',$str); var_dump($job); Like always if i missed something just drop me some lines below.

by Webmaster

Why using cURL to retrieve images from url ?

Issue: Download an image from an url. Some ways of doing it: using GD or cUrl Test results: The original picture size is 20.04 KB (20526 bytes) Using GD (ImageCreate...) we are actually making a new file from the original one so: - at 100% quality the file size is: 59.78 KB (61217 bytes) <--- this is 3 times bigger than the original file; -...

by Webmaster

IE7 Input background image scroll upon typing a long text

As you probably already know having a background image on an input field is buggy in ie7. When you type in a long text the image scrolls left ... Even if there are a lot of opinions regarding this issue on the web none worked for me as I wanted (cross-browser). Here is my solution: The CSS: [sourcecode language="css"] input#SearchInput { border: 0; width: 230px;...

by Webmaster