mwstewart Posted January 7, 2009 Share Posted January 7, 2009 Hi all, I'm new to PHP and development in general. Please could someone tell me what the square brackets are for in the following statement: if (isset($output[plusOne($number2)])){ echo "Test successful."; } I assume they permit the output of the 'plusOne' function to be assigned to the $output variable. Is that correct? Link to comment https://forums.phpfreaks.com/topic/139844-help-with-brackets/ Share on other sites More sharing options...
gevans Posted January 7, 2009 Share Posted January 7, 2009 $output (im assuming) is an array the square brackets are telling your code to find a specific key within that array to check Link to comment https://forums.phpfreaks.com/topic/139844-help-with-brackets/#findComment-731587 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.