Hello, my script is using while to get mysql search results. Here is that part: while($row=@mysql_fetch_array($nt)){ $results = $row['title']; echo $results; } PHP: I want to give a value for results, and than echo it. I mean, I dont want to echo this in while section. Anyway to do this? Thanks...
You could always save it in an array for later use. $results = array(); while($row=@mysql_fetch_array($nt)){ $results[] = $row; } PHP: $result is now a multidimensional array, you can access the data by using $results[0]['title'] to get the first row in the table, or loop through it again where you need it... foreach($results as $key=>$val) { echo $val['title']; //Print all found titles. } PHP: Regards, Steve