So in a wordpress blog using prettylinkpro plugin, I found a link to the author’s site about an API.
http://blairwilliams.com/pretty-link/api/
I’m trying to get a post’s “pretty link” using the prli_get_link($slug) method.
Problem is, I believe that is returning an array, and I’m not verse in PHP.
So I think I’m looking for something like this:
prli_get_link($slug)[0]
Any advice?
PHP’s parser doesn’t allow direct array references on function returns, so
is a syntax error. You have to assign to an intermediate variable instead: