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!
Thanks for your reply but that would require me to throw in an if statement to determine if $uploads equaled "0" as it's going to create an invalid path. I'm hoping there is some way of doing this without assigned it a value other than $uploads = "" if I have to define it.
I tried something very similar to that and I had a parse error, then trying that I realized that I wouldn't be able to actually receive the value from the variable already defined before (and outside of) the function.
Yeah my learning "style" is sort of like the clearance rack at a store that has like fifty mark downs. I think I've made some progress...I read php.net pretty much daily now.
JAB Creations wrote:Yeah my learning "style" is sort of like the clearance rack at a store that has like fifty mark downs. I think I've made some progress...I read php.net pretty much daily now.
This is the better approach
Congrats!
There are 10 types of people in this world, those who understand binary and those who don't
JAB Creations wrote:Thanks for your reply but that would require me to throw in an if statement to determine if $uploads equaled "0" as it's going to create an invalid path. I'm hoping there is some way of doing this without assigned it a value other than $uploads = "" if I have to define it.
The implication of this is that you're not checking the value of $uploads in the function. You should be checking to make sure it contains a value that won't break the rest of the function code regardless of where the value came from.