I am looping through my db and pushing values into 3 different arrays.
At the end, I want to loop through all the arrays and assign the values to specific array variables so that I can import the print statement into flash:
For example:
I need my final print statement to look like this:
print(profile_name[0]=andy&testimonial[0]=ITL&program[0]=test&profile_name[1]=drew&testimonial[1]=CIS&program[1]=test 2);
However, I'm not sure how I should make those variables be arrays:
Right now I have 1 variable that is assigned multiple values and that is not what I want:
$namesArray = array();
$testimonialsArray = array();
$programsArray = array();
while($row = mysql_fetch_array($result, MYSQL_NUM)){
array_push($namesArray, $row[1]);
array_push($testimonialsArray, $row[3]);
array_push($programsArray, $row[4]);
}
for ($i=0; $i<$total; $i++){
print("profile_name=");
print($namesArray[$i]);
print("&");
print("testimonial=");
print($testimonialsArray[$i]);
print("&");
print("program=");
print($programsArray[$i]);
print("&");
}