$php_mysql$ Posted January 26, 2011 Share Posted January 26, 2011 hi friends. to fetch results from the database i made a function and how i call the function on a page like $results = GetResults($someID); when i print_r the $results i get all the results, but now im confused on how do i print the rows individually? say i got Title row how will i only get the Title row from the $results VAR? Quote Link to comment Share on other sites More sharing options...
litebearer Posted January 26, 2011 Share Posted January 26, 2011 presuming $results is an array... $results = GetResults($someID); $c = count($results); $i=0; while($i<$c) { echo $results[$i] . "<br>": $i ++; } Quote Link to comment Share on other sites More sharing options...
$php_mysql$ Posted January 26, 2011 Author Share Posted January 26, 2011 thanks mate got it done by foreach. :-) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.