View Single Post
Old 01-25-2008, 11:12 AM   #7 (permalink)
Tanax
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

Yah, so in your case, you would want to do:

PHP Code:
$aSep explode(','$aQuery['actors']);

$aActors = array();
foreach(
$aSep as $iId) {
$sql "SELECT * FROM `actors` WHERE `id` = '".$iId."' LIMIT 1";
$query mysql_query($sql);

if(
$query) {
$aActors[] = mysql_fetch_array($query);
}
else {
echo 
'Could not fetch data for actor id: ' .$iId;
}
}

foreach(
$aActors as $aActor => $aInfo) {
echo 
$aInfo['First Name'];

Where $aQuery is an array of the movie info..
Tanax is offline  
Reply With Quote
The Following User Says Thank You to Tanax For This Useful Post:
Brook (01-25-2008)