I'm not sure, but I thought there was a way to rename variables and/or change them to create additional variables.
Can someone enlighten me?
lets say I grab a query that says the maximum of the season field is 6.
I run a loop loops through 6 times, running 6 seperate queries.
These queries grab all the rows that have season fields that are the same number as the loop's number.
I need variable for each query.
But I can't create these variables manually, because I don't know how many queries will run.
you can create an array variable like this
$xyz = array();
lets assume a loop
while(condition)
{
$xyz[ ] = /* store the retrieved value */
}
in order to retrieve the value
use foreach( $xyz as $value) syntax
or u can refer normally as $xyz[i] also if you want to know the length of the array use the function count($xyz)
I hope this work or else please provide you syntax so that I can figure out some possible solution
Bookmarks