MySQL Forums
Forum List  »  PHP

Output apostrophe
Posted by: Don Vanderloo
Date: March 31, 2009 09:47AM

Okay, bonehead question, probably, but this is the 'newbie' forum right??

I have created a database of client contact information. My favorite Irish client is named O'Neill. When I attempt to echo out his information using php, everything after the 'O' is deleted. What's the trick to fix this? A snippet of my php reads:

@ $db=new mysqli(.....);
$query="select * from `clients`";
$result=$db->query($query);
$numRows=$result->num_rows;

for ($i=0; $i<$numRows; $i++)
$row=$result->fetch_assoc();
echo $row['name'].'<br />';
echo $row['address'];
/// you get the idea ///
}

Thanks in advance!

Options: ReplyQuote


Subject
Written By
Posted
Output apostrophe
March 31, 2009 09:47AM
March 31, 2009 01:34PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.