function index() {
App::import('Helper', 'Html'); // loadHelper('Html'); in CakePHP 1.1.x.x
$html = new HtmlHelper();
debug($html->link('Cake!', 'http://cakephp.org'));
}
Tutorials, Chrome extensions Code samples JavaScript Angular CSS HTML. Updated regularly. Visit and subscribe to the rss feed.
Wednesday, July 28, 2010
php- Cakephp how to load helper in a component
Helpers can be loaded in to components and use as class objects
Thursday, July 15, 2010
Php - creating table of values with fixed column from an array of values
Easily create tables
Use array_chunk($arrvalues, 2);
Array
(
[0] => Array
(
[0] => a
[1] => b
)
[1] => Array
(
[0] => c
[1] => d
)
[2] => Array
(
[0] => e
)
)
http://www.php.net/manual/en/function.array-chunk.php
Use array_chunk($arrvalues, 2);
Array
(
[0] => Array
(
[0] => a
[1] => b
)
[1] => Array
(
[0] => c
[1] => d
)
[2] => Array
(
[0] => e
)
)
http://www.php.net/manual/en/function.array-chunk.php
Subscribe to:
Posts (Atom)