My code is:
It isn't the whole code.
require_once('config.php');
$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
if(!$link) {
die('Failed to connect to server: ' . mysql_error());
}
$db = mysql_select_db(DB_DATABASE);
if(!$db) {
die("Unable to select database");
}
$result = mysql_query("SELECT * FROM bedrijvenorders WHERE gebruikersnaam='$gebruikersnaam' AND ordernummer='$ordernummer'");
$row = mysql_fetch_array($result);
$tekst = $row['advertentietekst'];
echo strlen($tekst);
I want to show how many characters are in the string.
This is my string for example:
1 2 3 4 5
The strlen function returns: 13
And it must be: 9
How can I solve this problem??
This post has been edited by localhost: 22 March 2011 - 10:02 AM

New Topic/Question
Reply



MultiQuote





|