In PHP, I would like to get the text value of the customer name tag. I am writing this code but it doesn't work. could you help me? thank you
$customerName = $dom->get_elements_by_tagname("item"); $customernameValue = customerName[0]-> first_child()->node_value ();
I'm not familiar with the library you are using, but it looks like you just missed the $ before customerName on the second line.
customerName
You are missing a sign $ , try this:
$
$customerName = $dom -> get_elements_by_tagname ("item"); $customernameValue = $customerName[0] -> first_child() -> node_value ();