tags:

views:

97

answers:

2

Hi guys, i have a strange problem... I'm getting string-data from db:

$siteDesc = strval( $configHandle->getConfigValue( 'SITE_DESCRIPTION' ) ); 
var_dump( $siteDesc );

It returns:

string(19) "Some description..."

But in code:

<input type="field" name="site_desc" value="<?=$siteDesc;?>" />

There is a lo of spaces in textfield before text:

"           Some description..."

Why?

A: 

What happens if you trim the value before inserting it in the text field?

<input type="field" name="site_desc" value="<?=trim($siteDesc);?>" />
easement
I tried that. Didn't help.
Ockonal
A: 

maybe you have a linebreak in there, but that would usually account only for one whitespace

knittl
Hm.. my editor made it, but didn't show... Thanks
Ockonal