Thx: [PHP] sprintf %s string /or " Why on earth do I only get ONE char displayed???"

From: Date: Thu, 16 Nov 2000 14:58:12 +0000
Subject: Thx: [PHP] sprintf %s string /or " Why on earth do I only get ONE char displayed???"
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-25700@lists.php.net to get a copy of this message
----- Original Message ----- From: "Sylwester Zarębski" <sylwek@isp.net.pl> <snip> > You've got error here. > You pass parameters to function as strings, then > you should use them as strings. Here you use variable > $row as array, but $row in function should be string > (because you call function before with strings, not arrays). > You should use simple $row :-) > If you use $row[$col_name] it expands to: > $col_name is uninitialized and then can be used > as zero, and zero char of string $row is your first > char :-). This is the explanation. Use simple $row variable. </snip> $value = htmlspecialchars ($row); Works fine now, thank you ! Al (Maybe I should not have accepted that last drink yesterday evening... ;) )

« previous php.general (#25700) next »