Php Cannot Use String Offset As An Array Using Factors