Reputation: 28853
What is difference between this:
$html->link
and
$this->Html>link
The first one works fine, but the second one always throws errors, but is used often in documentation over the first one. What is the difference?
Upvotes: 1
Views: 120
Reputation: 9964
The second syntax is newer and was introduced with CakePHP 1.3.0: http://book.cakephp.org/view/1572/New-features-in-CakePHP-1-3#View-Helpers-1574. And you can use this syntax not only in other helpers as mentioned by kizzx2, but also in your views.
Getting errors with this syntax means you are using an old CakePHP version.
Upvotes: 0