I have a mapped Array named: $mapped
Below is a result of var_dump($mapped);
array(32) {
["Age: "]=> string(137) "21 Years. "
["Ethnicity: "]=> string(122) "Caucasian "
["Location: "]=> string(152) "Paris, France "
}
The problem is I don't get any results with: echo $mapped["Age: "];
I have tried:
echo $mapped["Age: "]; // No results
echo $mapped["Age:"]; // No results
echo $mapped[" Age: "]; // No results
echo $mapped['Age: ']; // No results
echo $mapped['Age:']; // No results
var_dump($mapped["Age: "]); // result: NULL
What am I doing wrong? I want echo $mapped["Age: "]; to result: 21 Years
Thank you for your help
string(137) "21 Years. "But there's significantly less than 137 characters. You probably are not seeing all of the spaces actually present, as @Pekka웃 says.file_get_contentsand surly I want to trim them. Now I found out why I cant echo and it was after looking at source code I found out that this Array have a LOT of HTML codes inside. How can I remove HTML codes from this Array? Should I usestrip_tagshow to use it?