public static function get_value_between_chars($haystack, $index = 0, $opening_char = '[', $closing_char = ']')
	{
	    $offset = 0;
	    $found = true;
	    $value = null;
	 
	    for ($i = 0; $i < $index + 1; $i++)
	    {
	        $op_pos = strpos($haystack, $opening_char, $offset);
	        if($op_pos !== false)
	        {
	            $cl_pos = strpos($haystack, $closing_char, $op_pos + strlen($opening_char));
	 
	            if($cl_pos !== false)
	            {
	                $value = substr($haystack, $op_pos + strlen($opening_char), $cl_pos - $op_pos - strlen($opening_char));
	                $offset = $cl_pos + strlen($closing_char);
	            }
	            else
	            {
	                $found = false;
	                break;
	            }
	        }
	        else
	        {
	            $found = false;
	            break;
	        }
	    }
	 
	    if($found)
	    {
	        return $value;
	    }
	    else
	    {
	        return null;
	    }
	}