I gather all the names using this function and put them in an array
[code=php]
//////////////////
// band links ///
////////////////
function bandmatch($connection)
{
global $band_array;
$table_name = “band_list”;
$sql = “SELECT `band` FROM `band_list`”;
$resultband = mysql_query($sql) or die (‘Error line 470:’ . mysql_error());
$band_array = “”;
while($row = mysql_fetch_array($resultband))
{
$band = ($row[‘band’]);
$band_array .= “$band, ”;
}
}
I am confused on this part here: I need to be able to (when there is a match on a name in the array) provide a link with the name in the $_GET I suspect something like this..
[code=php]
//$details hold text I am looking for the match in.
$details = preg_replace($band_array)b/i’,
“<a href=”folder/get_info.php?name=match_from_array” title=”>$1</a>”,
I can do everything form that point I just don’t know how to get the match out of the array and place it in to the link ?name=The Match
Example of what I am trying to accomplish:
Array:
$band_array = (thisband, that band, other name);
Paragraph:
If I want [B]this band[B]that band
Result:
[code=html]
If I want <a href=”folder/get_info.php?name=this band”>this band</a> and <a href=”folder/get_info.php?name=that band”>that band</a> to be links then I need to get this figured out.