我刚刚开始学习PHP,我无法弄清楚如何从HTML元素中获取文本。如何获取PHP中的HTML元素中的文本?
这里是我的HTML代码(我做网页的文本编辑器):
<div id="example-one" contenteditable="true">
<style scoped>
#example-one { margin-bottom: 10px; }
[contenteditable="true"] { padding: 10px; outline: 2px dashed #CCC; }
[ contenteditable="true"]:hover { outline: 2px dashed #0090D2; }
</style>
<p>Everything contained within this div is editable in a browser that supports <code>HTML5</code>. Go on, give it a try: click it and start typing.</p>
</div>
你们可以请说明我会得到段落元素的文字,或者div元素?
感谢收听! -Sam