Re: Re: A beginner´s question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Micah Gersten wrote:
> Nathan Rixham wrote:
>   
>> Eduardo wrote:
>>     
>>> Hi, I am Eduardo, a new PHP programmer and an old Cobol veteran.
>>> I know that
>>>     $tastes=$_POST["tastes"]; moves the content of "tastes" from
>>>     <p><textarea rows="5" name="tastes" cols="28"></textarea></p>
>>> to
>>>     $tastes
>>>
>>>
>>> How do I move the content of $tastes to X of
>>>     echo "<textarea rows="5" cols="28" readonly name=X>\n";
>>> ?
>>>
>>> Thanks, Eduardo
>>>
>>>       
>> echo "<textarea rows="5" cols="28" readonly name=" . $tastes . ">\n";
>>
>> echo "this is how you echo a " . $variable . " in a string";
>>
>>     
>
> While that is true, that's probably not what the OP wants.
> He's probably looking for:
> echo "<textarea rows="5" cols="28" readonly
> name="tastes">$tastes</textarea>\n";
>
> Thank you,
> Micah Gersten
>
>   
As Vicente pointed out, there was a problem with what I posted, so
here's the fixed version:

echo '<textarea rows="5" cols="28" readonly
name="tastes">',$tastes,"</textarea>\n";

Explanation:
Single quotes save from backslashing the quotes.
Commas save the concatenation overhead.
Quotes around the last block since it uses \n which needs doublw quotes to output.


Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux