![]() |
User defined function with 'return' statement -- not working
This example is from a book that I'm using to learn, but I can't get it to work properly! What am I doing wrong here? I may have copied something wrong, but I've spend a couple of hours trying to figure it out...? :-/
php Code:
Thanks for any help... Dave |
PHP Code:
|
The only segment that I have modified is assigned the value of the
salestax function to the $nYourtotal variable. When you issue the return in your custom function, that simply returns data back, and so you can either assign (as in our case), print (as we do later on when we print), or do nothing with (as you were doing previously).php Code:
|
Thanks to you both, Eric and Wildhoney! I see now that I am blocking on a basic concept related to UDFs, which I will write about (ask about!) in a different post.
Dave |
| All times are GMT. The time now is 04:07 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0