Blog Archives

Variable Variables in PHP : Power of PHP

Power of PHP extended to use a variable variables. Example: Sometimes it is convenient to be able to have variable variable names. That is, a variable name which can be set and used dynamically. A normal variable is set with

Tagged with: , , , , , ,
Posted in PHP, Programming

Formating monetary values

<?php $number = 1234.567; // First method echo sprintf(‘%.2f &euro;’, $number); // 1234.57 € // Second method echo number_format($number, 2, ‘,’, ‘ ‘) . ‘ &euro;’; // 1 234,57 € // Third method setlocale(LC_MONETARY, ‘en_US’); echo money_format(‘%n’, $number); // $1,234.57

Tagged with: , , , ,
Posted in PHP, Programming

How to send Emails From PHP using PHPMailer

PHP email transport class featuring file attachments, SMTP servers, CCs, BCCs, HTML messages, word wrap, and more. Sends email via sendmail, PHP mail(), QMail, or with SMTP. phpmailer_v21download or download it from sourceforge.net http://sourceforge.net/project/showfiles.php?group_id=26031 put these files in you website

Tagged with: , , , , , , ,
Posted in email, PHP, Programming