thephpdeveloper 
user profile for thephpdeveloper
Sam Yong
hellclanner@live.com
N/A
October 19, 2008
Most Popular Pings
Sharing my notes with everyone! Note that you have to download Adobe Acrobat Reader to view the file. Do save a copy of the file on your computer by downloading it. Use of the file in legal mannerism is ok with me as long as the files are not re-distributed or modified without my permission.O Level Pure Chemistry/Science(Chemistry) Cation and Anion Tests:O Level Addtional …
642
0
- To follow/ignore thephpdeveloper, please sign in to your Ping.sg account.
While I was doing a PHP project on my localhost using XAMPP, i realised I needed a local mail server in order to send out mails from my own workstation for testing. To come to think of it, XAMPP provides MercuryMail - but it's user-unfriendly interface and low level support makes it very difficult to use.Previously when I was on Windows XP Professional Edition, I was able to …
317
0
- To follow/ignore thephpdeveloper, please sign in to your Ping.sg account.
Just earlier on, I was working on a project for a friend of mine. The project was a php website that includes shopping cart, and some other modules. Well, lately i'm very into facebook and I was fascinated by their auto-growing text boxes. So i googled and found some javascript code snippets too. However, these scripts either require jQuery javascript framework or use time …
140
0
- To follow/ignore thephpdeveloper, please sign in to your Ping.sg account.
Take a look at all these nonsense. Rubbish are thrown NEAR the chute INSTEAD of DOWN the chute. I really despise these people. Especially if they're adults, which i suppose so. They are supposed to be more mature, more understanding, don't have to throw and make Singapore look "less green".Ya green, in the sense of facial expression that i want to vomit.got one unit on the …
105
0
- To follow/ignore thephpdeveloper, please sign in to your Ping.sg account.
whoots. finally i got a peek at Adobe's new Creative Suite 4 (CS4). The only products I needed, and i've got them, are Adobe Fireworks CS4 and Adobe Photoshop CS4 Extended. They both have a more standardized User Interface (UI) layout and design. Fireworks also has become smarter with all those object snapping and stuff like this. As for Photoshop, it feels nothing different …
90
0
- To follow/ignore thephpdeveloper, please sign in to your Ping.sg account.
Last 5 Pings
It is at times quite troublesome having the need to detect what image type is the file, then decide which function (imagecreatefromjpeg, imagecreatefrompng or imagecreatefromgif) to use for the image. Well, here's a simple solution.<?php$src = "http://example.com/image.jpg";$image = imagecreatefile($src);function imagecreatefile($f){$content = file_get_contents($f);return …
47
0
- To follow/ignore thephpdeveloper, please sign in to your Ping.sg account.
I was browsing the web earlier on, and I chanced upon one of the PHP website development server at http://pb11.php.net/Some comments:the interface (UI) is definitely much better and everything's clearer.however, the layout and contents are much about the same from the current one.So you can try it out at http://pb11.php.net/Take note that the mirror is unofficial and is not …
44
0
- To follow/ignore thephpdeveloper, please sign in to your Ping.sg account.
It's always said that we should think out of the box. In any programming language, we should write functions out of certain statements statements.Consider this:<?php$arr = array(/* 10000 elements */);for($i = 0; $i < count($arr); $i++){ // ...}?>If you work this out slowly using a debugger or what, you would have noticed that count($arr) will be called for each …
32
0
- To follow/ignore thephpdeveloper, please sign in to your Ping.sg account.
I've looked through the PHP Arrays function list lately while working on some php scripts that requires lots of interaction with Arrays. It came to me that the following 2 are the identical:$value = end($array);$value2 = $array[count($array)-1];But which is more efficient?In a test, I tested both with a 1000 elements array. A total of 5 tests were ran and an average of …
37
0
- To follow/ignore thephpdeveloper, please sign in to your Ping.sg account.
Lately I've been working on a project that has MySQL tables with relationship to each other. I have several functions that accesses the Database, and one function to call all these functions. However, I need to know that if one of the function that accesses the database fails, I need to do a rollback. Here's how we can do it:<?phpfunction addShop($shop){$ok = true;$ok = …
34
0
- To follow/ignore thephpdeveloper, please sign in to your Ping.sg account.



…