Tag Archives: php

PHP Ternary Operator (if-else shortCode)

php-ternary-operators

The ternary operator a shortcut comparison operator that replaces an if-else statement. This can be implemented to reduce number of lines and time costs in your projects if you need to use a lot of comparison operators. The ternary operator is really very simple so use, but it might confuse newbie PHP programmers. Continue

PHP sessions: video tutorial

php_sessions_video_tutorial

A PHP session allows you to store user information on the server for later use. However, session information is temporary and is usually deleted very quickly after the user has left the website that uses sessions. Continue

Bracketless VS traditional if-else statement

concatenating-php-strings

There is no secret that some developers are using traditional statements, some – bracket-less. But witch one is better to use?
I’ve dived directly into testing. Continue

Concatenating PHP strings

concatenating-php-strings

In this tutorials I’ll show you how to manipulate strings via concatenating several strings together. It should help PHP rookies and become a great time-saver. Continue

Replacing text into clickable links

php-replacing-text-urls-into-clickable links

Ever wondered how these PHP magicians converts text urls into clickabe links? There are several ways to do this, but probably the best one to use is ereg_replace. Continue

Snippet: adding suffix to the number

php-snippet-number-suffix-1t-2nd-3rd-th

It is so simple to add suffix to any number in english and ir provides a lot better user experience. Continue

Redirecting via PHP/HTML

redirecting-php_header_location-html

There is a lot ways to redirect your users e.g. from old domain to the new one or refresh site automatically when you are working on the design. I’ll review HTML, PHP and apache mod_rewrite ways to do this. Continue