Simple way to center a block using divs
<div style=”text-align: center;”> <div style=”text-align: left; margin: 1em auto; width: 50%;”> Enter your content here </div> </div>
All Blog posts
<div style=”text-align: center;”> <div style=”text-align: left; margin: 1em auto; width: 50%;”> Enter your content here </div> </div>
This listing of the differences between PHP4 and PHP 5 is is probably something that is quite common, but it is always worth a review. PHP5 is a lot different than PHP4 with the main differences being in how it …
PHP’s preg_split() function enables you to break a string apart basing on something more complicated than a literal sequence of characters. When it’s necessary to split a string with a dynamic expression rather than a fixed one, this function comes …
Replacing Patterns In the examples in Part 2, we have searched for patterns in a string, leaving the search string untouched. The preg_replace() function looks for substrings that match a pattern and then replaces them with new text. preg_replace() takes …
Matching Patterns The preg_match() function performs Perl-style pattern matching on a string. preg_match() takes two basic and three optional parameters. These parameters are, in order, a regular expression string, a source string, an array variable which stores matches, a flag …
In programming you quite often want to test a string for the occurrence of a character or group of characters. This is particularly true for such things as data validation on form input boxes. Regular expressions provide a pattern matching …
To help counter SQL injections you need to make sure that entered values use minimum character types as possible. So you restrict usernames to just a-z and 0-9 characters. To test for these, use something like : //—————————————————— /** * …
The paperback version of ‘PHP Tutorials: Programming with MySQL and PHP’ has been updated to include more code examples and published and is available from the Amazon book store. Do a search for the ISBN number 0992869730 or the above …
Updated version of ‘PHP Tutorials: Programming with MySQL and PHP’ Read more »
A Visual Studio C# application The Amazon Product Advertising API allows you to connect to Amazon, then search and lookup product information such as price details, descriptions and so on. In conjunction with an Amazon Affiliate ID you can make …
There are a number of articles on formatting an e-book for Kindle so I thought I would contribute my thoughts and ideas so far. The most common way to create a Kindle e-book is to use Microsoft Word because it …
Formatting for Kindle eBooks – Hints, Tips and Tricks Read more »