I am using the get_the_author_meta('description')
function to get the author description in WordPress with this code:
$author_desc = get_the_author_meta('description');
$author_data = explode('>', $author_desc);
var_dump($author_data);
With the description being: E-commerce consultant>man>het e-commerce
. I want the explode function to create 3 array items, splitting the string by ‘>’.
But the result is this:
array (size=1)
0 => string 'E-commerce consultant>man>het e-commerce' (length=46)
It seems that it DOES put the string in an array, but creates only one row…
Instead of
>
char there is entity>
. Sou you can explode by this entity string:Fiddle