PHP Call to undefined function

This was a developer mistake – a misplaced ending brace, which made the above function a nested function. I see a lot of questions related to the undefined function error in SO. Let me note down this as an answer, in case someone else have the same issue with function scope. Things I tried to … Read more

How to run a PHP function from an HTML form?

The “function” you have is server-side. Server-side code runs before and only before data is returned to your browser (typically, displayed as a page, but also could be an ajax request). The form you have is client-side. This form is rendered by your browser and is not “connected” to your server, but can submit data to the server for processing. Therefore, … Read more

“cannot be used as a function error”

You are using growthRate both as a variable name and a function name. The variable hides the function, and then you are trying to use the variable as if it was the function – that is not valid. Rename the local variable.