unixman_again Posted November 26, 2013 Posted November 26, 2013 given this PHP code var_dump($x); produces this output array(1) { ["http://www.mysite.uk/it_services/index.php/component/content/?view=23:it-services&id=339:my-account"]=> array(3) { ["relation"]=> string(9) "canonical" ["relType"]=> string(3) "rel" ["attribs"]=> array(0) { } } } How can I just get it to output the url? Thanks! (I can normally do this but I'm clearly suffering brain fade today )
LosOjos Posted November 26, 2013 Posted November 26, 2013 (edited) I think... key($x); EDIT: or actually it probably needs slicing to a single element first, i.e. key(array_slice($x, 0, 1)); Edited November 26, 2013 by LosOjos 1
LosOjos Posted November 26, 2013 Posted November 26, 2013 Of course! I've had enough of those moments in the last few days (albeit in C#/SQL) to feel your pain!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now