Jump to content

php select all in textarea


pcw

Recommended Posts

Hi, I have a textarea that is populated with some code. I would like to be able to select that code with the click of a button. It would be cool if this was copied at the same time, so it could be pasted into another document.

 

I have seen similar with javascript, but am not comfortable with using it, and prefer PHP.

 

Any help is much appreciated.

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/163516-php-select-all-in-textarea/
Share on other sites

Php is a server side scripting language. It is executed on the web server when the page it requested. It outputs content (HTML/CSS/Javascript/media) to the browser.

 

A textarea only really exists after it has been rendered by the browser. You will need to use a client-side solution (javascript.)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.