|
cheryl
| Joined: 17 Apr 2004 |
| Posts: 84 |
| Location: Newark, DE |
|
 |
Posted: Mon Oct 04, 2004 1:08 pm |
|
 |
 |
 |
 |
I was recently writing an administrative script for one of the Professors at UDel to enter a bunch of students grades into a MySQL database so they can view their grades on the web. One thing that I found about PHP that was awesome was how easily you can dynamically create variable names. Since the Professor was entering everything on one page, my action page had a loop that pulled in each value. Rather than using an array, I was able to easily create variable names, such as student$id
which was so much easier than perl or Java, where I would have had to use concatentation to create the variable names before actually assigning values to them! Has anyone done anything similar to this before?
|
|
|
|
byron
Forum Admin
| Joined: 07 Mar 2004 |
| Posts: 160 |
| Location: Newark, DE, USA |
|
 |
Posted: Tue Oct 05, 2004 2:17 pm |
|
 |
 |
 |
 |
You can do this real easy in CF as well, setVariable("myStudent#theID#", value)....
evaluation is very easy as well,
evaluate("form.myStudent#theID#")
|
|
|