I currently have some json data that I am retrieving via PHP, however, my result has String(20) in front of it;
** Answer - Var_dump causes this, just echo.
I currently have some json data that I am retrieving via PHP, however, my result has String(20) in front of it;
** Answer - Var_dump causes this, just echo.
The string(20)
is because you asked for a var_dump()
of the item. var_dump()
does more than echo the item, it describes it.
From the docs -
This function displays structured information about one or more expressions that includes its type and value. Arrays and objects are explored recursively with values indented to show structure.
Extra Answer - yes, try str_replace()