I am still learning php, and got stumped with how to generate dynamic variables.
I normally do something like this after I do my query SELECT to get all the data from the row.
$ID = $row->ID; $parentID = $row->parentID; $name = $row->name; $color = $row->color; $location = $row->location; $status = $row->status;
This is short example, sometimes it can get pretty long. So, I am sure there is a better way to do this.
If I start off with a comma separated string like:
$string = "ID, parentID, name, color, location, status";
How do I go about creating variables if I were to supply the above string?
Can someone pls either give me an example, or point me to a thread that can?