The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
building a function with an optional argument
how would i go about doing the above
PHP Code:
|
#2
|
||||
|
||||
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. |
#3
|
||||
|
||||
I don't understand your question?
|
#4
|
||||
|
||||
basically i have the function getpiece
PHP Code:
PHP Code:
PHP Code:
|
#5
|
||||
|
||||
I still don't get what you want, but maybe it's this:
PHP Code:
|
#6
|
||||
|
||||
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. |
#7
|
||||
|
||||
thanks all for your help, in the end i got it to work using function($var) for both calls
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|