This has to do with PHP basics, not Calendar API...
Declare NewFunction outside outputCalendarByFullTextQuery. There's no point
nesting functions in PHP since to see outside variables you have to "import"
them into the nested function (with "global" keyword) :
function NewFunction($event) {
switch ($event) {
case 'One':
return '1';
case 'Two':
return '2';
}
return false;
}
function outputCalendarByFullTextQuery($client,$startDate, $endDate)
{
echo *function *NewFunction($event);
}
Text in red should be REMOVED, I guess this is a typo error ("function"
keyword is used only for declaring function, not calling them).
I strongly advise you to get familiar first with PHP programming before
writing gdata API applications.
--
You received this message because you are subscribed to the Google
Groups "Google Calendar Data API" 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://code.google.com/apis/calendar/community/forum.html