I was recently taking a small quiz in PHP as part of a job interview (by the way if anyone knows of a job opening for a telecommuting contractor, please let me know). One of the questions posed contained this piece of code which has been slightly modified for our use. <input type=”text” name=”order” value=”<?php echo $_POST['order']; ?>” [...]
Since I have neglected my blog this week I decided to write a small continuation of the discussion on Types in PHP. I was helping a fellow coder yesterday, and he was having problems with a simple comparison statement. The situation he found himself in was this: A $_POST value could either be 0 (zero) [...]
We have all heard PHP is a loosely typed language. If you are unsure of the meaning of the term “loosely typed” the definition in the PHP manual states (at least for our discussion): PHP – Manual The type of a variable is usually not set by the programmer; rather, it is decided at runtime [...]
I noticed an interesting fact yesterday, which pertains to my original post MySQL returns strings (if you have not read this yet, please do). The PHP function mysql_num_rows(), which returns the number of rows in a result set, I assumed would return the number of rows as a string. Since field values are all returned [...]
This is a feature I have run into a few times (specifically when writing the unit tests for the Mysql Package). I thought I would post my thoughts and hopefully others will be able to expand on the topic. When querying data out of MySQL into PHP, all values arrive in PHP as strings, even [...]
I just wanted to officially announce that my first package is available for download. I decided to release the Mysql Package first. This was done for three reasons. Usefulness – After using PHP for a few days everyone inevitably wants to add a database to there repertoire. Since the most common database coupled with PHP [...]