View Single Post
Old 11-16-2008, 06:33 PM   #1 (permalink)
sarmenhb
The Addict
 
sarmenhb's Avatar
 
Join Date: Jan 2008
Location: los angeles
Posts: 309
Thanks: 44
sarmenhb is on a distinguished road
Default anyone have a function for these

I'm trying to figure out how i can put these tasks into a function so i cant shorten my coding. here is what I've tried

Code:
function fetch($query,$field) {
$qResult = mysql_query($query);
while($row = mysql_fetch_assoc($qResult) {

return $row['$field']; 

}
}
what have u tried?
__________________
no signature set
sarmenhb is offline  
Reply With Quote