This week I rewrote one of the PHP tasks from earlier and created a new function to emulate the functionality of str_pad. The function I wrote accepts a text string parameter, length, a reverse parameter (for padding on left or right) and finally an optional symbol parameter to show where the padding is happening. In addition to this I have …
PHP provides many different functions for manipulating strings. Some of the more common functions are provided here, however for a full listing of all the available string functions see http://www.php.net/manual/en/ref.strings.php.
This week I have been focusing on the first few chapters of Doyle (2010), specifically on PHP language basics, decisions and loops and strings.
Conditional statements (or decisions) and loops make up a good portion of programming code in general. I am familiar with these concepts though other languages, however I have never programmed them in PHP. This week I have been reviewing the first 5 chapters of Beginning PHP 5.3, which has been giving me a good solid introduction to PHP.
Variables in PHP are similar to define and use as with other programming languages. PHP uses loose typed variables, in other words they do not have to be defined specifically as a datatype upon initialization and can be changed to other data types using expressions.
This week I have been reading the first five chapters of Beginning PHP 5.3, Doyle (2010). Chapter 1 gave a good overview of PHP and it’s advantages. It drew comparisons to other programming languages, which I found interesting coming from a ColdFusion background.