I am very new to PHP and hope you can help me with this.
I am fetching some data from SQL and try to create an array that I want to echo on a page.
When I
An array must be printed using:
print_r($arrayValue)
you can keep the print value also (EDITED):
$x = print_r($arrayValue, true)
but I prefer the json way if it's for logging purposes:
echo json_encode($arrayValue)
keeping in mind every value must be json-serializable.
...
Doing a plain echo $arrayValue will always print "Array" word without any content. Yes, it's a bit unintuitive (since other languages like python don't behave like that) but it is what it is.