I have an html object:
<a href="https://website/" class="td-post-category" value="News" >News</a>
Which I get from typing $this->get_category(); in PHP.
My question here is if it is possible to get the value-field(News) from the HTML-object inside of PHP. Something like $this->get_category().value or $this->get_category()->value. Like we could in Javascript.
Or if you know how to "extract" variables from functions. Like if I had a variable named $selected_category_obj_name in the function get_category(), how to get this value when I have written $this->get_category(), how can I get the variable $selected_category_obj_name?
I am new to PHP, so some guiding would be very appreciated.
get_category()return an array or an object?<object>, The attributevalueis invalid for<a>. Looks like you're also new to HTML.