Cannot Use String Offset As An Array Php 7