SEO, PHP and Javascript Web Dev

Search Engine Optimisation, Web Development and Network Administration Ramblings

Tip of the Week : Nested Ternary Statement PHP

Moving complex php if statements into ternary statement syntax is not always recommended, but I think it can look quite neat and easily readable.
Ternary statements compress your code and using nested ternary statements sparingly in certain situations makes a mess of nested if statements far easier to scan when converted to a nested ternary.
e.g: […]

Debate Composition for a Free Sitewide Link - PHP5 Patterns

Using the composition pattern to generate, clean, well organised, flexible object orientated PHP code is a popular method with todays web programmers. Below is an example of two possible approaches to store a reference of one object to another - a form of composition.
To inspire some interaction we will give the best comment to […]

Validate Unicode/UTF-8 Form Input (Language Specific Characters)

Validating language specific characters in user input can be a bit of a pain, especially if you are using regular expressions to filter user submitted data.
Not only that, but testing your methods can also be a pain - firstly you will need some shortcuts for entering UTF-8/Unicode chars into form inputs if you […]

-->
  • Photography