Commas in variables
Posted: Thu May 24, 2007 2:33 pm
I know this is a stupid and elementary question, but I've done several Google searches and can't find any answers.
I am using a name from a MySQL database as a variable. The name is formated as "Lastname, Firstname".
The php code I'm using is
...where $row[$i] is referencing the name.
If the name in the database is "Smith, John" and that variable is passed, the result I get for the Name is How do I get PHP to keep the information following the comma?
Thank for your patience as I am new to PHP & MySQL.
I am using a name from a MySQL database as a variable. The name is formated as "Lastname, Firstname".
The php code I'm using is
Code: Select all
echo "<a href=SearchDetail.php?ID=" . $row[$i] . "&Name=" . $row[$i+1] . ">" . $row[$i] . "</a>";...where $row[$i] is referencing the name.
If the name in the database is "Smith, John" and that variable is passed, the result I get for the Name is
Code: Select all
Smith,Thank for your patience as I am new to PHP & MySQL.