![]() |
building a function with an optional argument
how would i go about doing the above
PHP Code:
|
Quote:
so you can do this: PHP Code:
PHP Code:
PHP Code:
PHP Code:
Any arguments that are needed have to be at the beginning though. |
I don't understand your question?
|
basically i have the function getpiece
PHP Code:
PHP Code:
PHP Code:
|
I still don't get what you want, but maybe it's this:
PHP Code:
|
Difficult to answer without seeing the query - does it pull some data based on the value of $p ?
Why don't you just make the first one ; $array = getpiece($p); and then just make the function return the appropiate data from the query using $id. |
thanks all for your help, in the end i got it to work using function($var) for both calls
|
All times are GMT. The time now is 01:12 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|