I have added the helper 'Number' in to controller actions using the statement $this->helpers[] = 'Number';". My goal is to format two whole numbers with commas in the thousands position when sending an e- mail for a more professional presentation.
The .ctp file paragraph (../app/views/elements/email/html/ email_reminder.ctp) containing the replacement variables I want to format looks like this: <p>If so, please return to your Service Department for another <b><?php echo $services?></b> before your odometer shows <b><?php echo $new_odometer?> <?php echo $odometer_type?></b>, and we will extend your coverage for another <b><?php echo $service_interval?></b> <b><?php echo $odometer_type?></b>. The replacement field variables $new_odometer and $service_interval are numbers in the database. It seemed according to the CakePHP cookbook (http://book.cakephp.org/view/409/format) that I could use a statement like <?php echo $new_odometer->format($new_odometer);?>. However, that doesn't work at all. Is there a way to format the number in the controller action, perhaps creating a formatted string field, that then could be sent as the replacement element? Thanks in advance!
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
