Skip to content

Getting a nested element PHP HTML Simple Dom

I want the commented items from an external website. I cannot edit the website. The website looks like this, i editted a lot of things out but this is the path from the body: I am using PHP HTML Simple Dom and PHP 7.3. I am currently using this code to get the information from the website: I get an

Convert an array string into an array

How do I convert ‘[“1″,”2-1″,”3-1-1”]’ into [“1″,”2-1″,”3-1-1”]? So, a string into an array. I’ve tried casting ‘[“1”,”2-1&…

PHP PDO return headers if there are no results

Is it possible to return the headers of a PDO query if there are no results as an array in PHP. For example: SELECT fruit.`type` AS ‘Type’, fruit.`shape` AS ‘Shape’, fruit.`age` AS ‘Age’…

get correct data from array

i am trying to decode array. this is my array array:4 [▼ “_token” => “tgPAddbrf3hI5tBIQIGyFYe9Y5RpwCj3rpZG5uVf” “resident_id” => array:4 [▼ 117 => “…