Marco000
-
Posts
3 -
Joined
-
Last visited
Posts posted by Marco000
-
-
But that means i might aswell change the field name in the database as it acomplishs the same thing?
also is there a list of reserved variable names? to look over to increase my knowledge of this? I notice this happens with "int" too (echo $object->int)
-
First of apologies for any inconvenience if this has been posted before as I’m unsure of what it could possibly be called/come under besides something like "reserved variables"?
I have a class that pulls a result out of a database and loads them into class variables by the database field name like the following
// Load the results into the class foreach ($array as $name => $value) { $this->$name = $value; }
This works fine as expected but the problem occurs when I try to echo one of the fields names in the database (it’s called "string") It ends up being like echo $advert->string; and it’s not outputting anything? In Dreamweaver its showing the class variable "string" as a different colour so I’m guessing something isn’t right in terms of "string" being reserved or a function?
How could I get the final/desired output/action I’m looking for here as I’m completely stumped! I normally Google for my solutions but have no idea what I have come across is called.
PS. Sorry for anything I do wrong, just signed up and don’t know the ropes yet in terms of acceptable behaviour, community expectations and ways to post queries.
Uploading multiple files - request entity or php issue?
in PHP Coding Help
Posted
Try the following code,
Because if you upload multipull images the array looks like