This is more about the way PHP functions are used.

Using:

function edit($id=null) {}
function delete($id) {}

Will set a default parameter so that you can call edit(); you will not
get an error. Now if you tried delete(); you will get an error because
the required parameter was not fulfilled.


On Apr 24, 8:49 am, rtanz <[EMAIL PROTECTED]> wrote:
> hi i am reading the manual and have some doubts regarding the use of
> $id, for example sometimes in an edit function you have function
> edit($id=null) while in a delete function you get function
> delete($id). Where do I use null and where not? thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to