This is a discussion on "Using an actual variable in function params?" within the PHP Forum section. This forum, and the thread "Using an actual variable in function params? are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Using an actual variable in function params?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
||||
|
Using an actual variable in function params?
Hi,
In a function, when you have parameters, you would usually just do: functionname(param, example) But I want to make it so the user, when referencing the function, enters a variable name. For example, when my function is called, it should look like: function($variable). How do I do this? If I created the function would it be:
Cheers! Jack
__________________
Resources Administrator
Grilling Gurus - Interviews with the Best Web Designers and Developers in the Industry Got a Question for Ryan Carson and his Web Design/Development team Carsonified? Jack Franklin - My Blog (It's a Pen in My Mouth BTW)
Last Blog Entry: My Latest Project - Grilling Gurus... (Jun 11th, 2008)
|
|
|
|
||||
|
Re: Using an actual variable in function params?
Fixed it
test($variable) and it should work.
__________________
Resources Administrator
Grilling Gurus - Interviews with the Best Web Designers and Developers in the Industry Got a Question for Ryan Carson and his Web Design/Development team Carsonified? Jack Franklin - My Blog (It's a Pen in My Mouth BTW)
Last Blog Entry: My Latest Project - Grilling Gurus... (Jun 11th, 2008)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Dump actual header | alexgeek | PHP Forum | 6 | Jan 23rd, 2008 14:54 |
| Can I force IE to open img at actual size? | billysalisbury | PHP Forum | 11 | Oct 26th, 2007 16:16 |
| is this variable right? | geyids | PHP Forum | 4 | Aug 6th, 2007 21:45 |
| Displaying the actual URL on page | shockbeton | Web Page Design | 9 | Jun 22nd, 2006 18:35 |
| using params in xsl IF element | zzqproject | Other Programming Languages | 0 | Nov 21st, 2005 23:12 |