Provision of = <value> in a function call for PHP means that if the value
is not provided, the specified is used as a default.
Example:
function foo($b = "World") {
echo "Hello " . $b;
}
foo();
foo("CakePHP");
Output:
Hello World
Hello CakePHP
hope that explains it for you.
Cheers,
Graham
On Sun, 18 Jan 2009 02:30:52 -0800 (PST), Delirium tremens
<[email protected]> wrote:
> What is it for?
>
> http://book.cakephp.org/view/336/Creating-Post-Views
> # function view($id = null) {
>
> http://book.cakephp.org/view/337/Adding-Posts
> function view($id) {
> = null removed!!!
> function add() {
>
> http://book.cakephp.org/view/339/Deleting-Posts
> 1. function delete($id) {
> no = null!!!
>
> http://book.cakephp.org/view/340/Editing-Posts
> 1. function edit($id = null) {
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---