Regex to match specific HTML-tags
<tag\b[^>]*>(.*?)</tag>
This loop prints every month number with leading zero’s:
for($i=1; $i <= 12; $i++): echo sprintf('%02s', $i); endfor;
Cause: you’re sending your e-mail as HTML only.
Solution: send the e-mail as “both”, like this:
$this->Email->sendAs = 'both';
Before you perform your save, execute a create first. This prevents data from being overwritten due to an ID being set that you didn’t know about.
$this->Model->create(); $this->Model->save($aYourData);
/app/config/database.php code:
var $connectionName = array( 'driver' => 'mysql' , 'persistent' => false , 'host' => 'localhost' , 'login' => 'your-username' , 'password' => 'your-password' , 'database' => 'your-database' , 'prefix' => '' );
In a random model:
$this->useDbConfig = 'connectionName';