Archive for PHP

The ternary Operator

There is an operator in PHP that is very similar in functionality to the if statement called the ternary (?) conditional operator. It evaluates to check if the first subexpression is true, if it is it will return the value of the second subexpression, if the first subexpression is false it will return the value […]

Read more

Special characters to RSS

Difference between IE and Firefox about special characters to RSS , you have a commando from PHP. $str = htmlentities($str, ENT_COMPAT, ‘UTF-8’); Both working 🙂

Read more

Example Date and strtotime to PHP

Soms heb je in een webpagina een datumvermelding nodig die relatief is aan de werkelijke datum. De eerste dag van de lopende maand, bijvoorbeeld. In PHP kan je met de “date”-functie, al dan niet in combinatie met “strotime” een groot aantal van deze relatieve datumvermeldingen eenvoudig opnemen. Algemene syntax: string date ( string $format [, […]

Read more

PHP Date – Reference

Now that you know the basics of using PHP’s date function, you can easily plug in any of the following letters to format your timestamp to meet your needs. Important Full Date and Time: r: Displays the full date, time and timezone offset. It is equivalent to manually entering date(“D, d M Y H:i:s O”) […]

Read more