
Working with large strings of text in your php application can often look messy and clumsy. An alternative method is to use the heredoc syntax:
{code type=php}$longString = <<
Working with large strings of text in your php application can often look messy and clumsy. An alternative method is to use the heredoc syntax:
{code type=php}$longString = <<
Previous post: Manage your Tasks, Get Things Done and Reduce Stress
Next post: Reseed MySQL Primary Key – AUTO_INCREMENT
{ 1 comment… read it below or add one }
The code in the example doesn’t work for me. Try this instead. 🙂
$longString = <<<EOT
Here’s a better version that works!
EOT;