Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

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 :()

Posted (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 by LosOjos
  • Thanks 1

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...