I would like to take my result from a SQL query, which I got in the form of arrays, and echo these out as the final step in a “search engine”. I would also like these arrays to be links, to the pages that I’ve set up for each information block, that the SQL query collects from my DB.
Something like this:
return $rows;
if (count($row > 0) {
foreach $rows as $row {
echo $row;
} }
Am I approaching this in the right way, how would I go on from there?
Any help appreciated.
Supposing
$rowsholds the information from your database as anArray,$row['link']contains the link and$row['name']the name you could do the following: