You are here: PSPad forum > English discussion forum > Selection to PHP variable

Selection to PHP variable

#1 Selection to PHP variable

Posted by: carbonize | Date: 2014-11-25 11:57 | IP: IP Logged

The selection to PHP variable function is a bit strange. For a start I would of expected it to put '; at the end. Also after you provide the variable name it puts

$VARIABLENAME ='SELECTED TEXT

with a space before the = but not after.

--
Carbonize

Options: Reply | Quote | Up ^


#2 Re: Selection to PHP variable

Posted by: pspad | Date: 2014-11-25 12:48 | IP: IP Logged

I am sorry, but I don't understand

Options: Reply | Quote | Up ^


#3 Re: Selection to PHP variable

Posted by: carbonize | Date: 2014-11-25 14:09 | IP: IP Logged

HTML -> Conversion -> Selection to PHP variable

--
Carbonize

Options: Reply | Quote | Up ^


#4 Re: Selection to PHP variable

Posted by: pspad | Date: 2014-11-25 14:40 | IP: IP Logged

I see.
Now the (strange) result is: $VARIABLENAME ='SELECTED TEXT
The correct result should be: $VARIABLENAME = 'SELECTED TEXT';
or
$VARIABLENAME='SELECTED TEXT';

Do you prefer spaces before equal sign or not? I don't know customs in PHP

Options: Reply | Quote | Up ^


#5 Re: Selection to PHP variable

Posted by: pspad | Date: 2014-11-25 14:51 | IP: IP Logged

The space before '=' was due to multiline conversion

$test ='something'."\n";
$test.='something else';

Options: Reply | Quote | Up ^


#6 Re: Selection to PHP variable

Posted by: carbonize | Date: 2014-11-25 20:55 | IP: IP Logged

Not that I will probably use this function but the usual method is a space either side of the =

--
Carbonize

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR