function($x=$y)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
anotherJean
Forum Newbie
Posts: 22
Joined: Tue Mar 30, 2004 3:59 pm

function($x=$y)

Post by anotherJean »

unfortunately this seems not to work

Code: Select all

function($x=$y) {...}
presetting variables in function not possible?

:?
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

I dont think presetting variables in functions is possible at all. I think when you define them in the function you will have to declare the values within the function statement. Not too sure!
anotherJean
Forum Newbie
Posts: 22
Joined: Tue Mar 30, 2004 3:59 pm

Post by anotherJean »

thnx Joe,

yeah a simple condition will do this job, however I hate superfluousness.


damn function($x=$y) looks neat and would be perfect for my needs :cry:
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

hehe, well at least there is loads of other advantages with programming out there. :D
anotherJean
Forum Newbie
Posts: 22
Joined: Tue Mar 30, 2004 3:59 pm

Post by anotherJean »

Joe wrote:hehe, well at least there is loads of other advantages with programming out there. :D
btw did you hacked ip reverse? :wink:
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

hehe you remembered :D well im afraid I never due to me dedicating most of my time to more important things, like sitting here all day and helping others, lol
Post Reply