Jump to content

Can you put a variable inside '[]' of another variable?


clonetrooper9494

Recommended Posts

Can you put a variable inside '[]' of another variable? As in:

<?php$pie[0][eggs1]stuff1...stuff2...stuff3...stuff4...stuff5...stuff6...stuff7;$abc="eggs2"echo $pie[$abc]?>

I am making a script that would save some time if I could just change the variable $abc and have it do a ton of stuff...I don't know any names for those '[]', but would the code work other than bad formating/'[]' placings?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...