How can I access a property with an invalid name?

Thanks to the comments (@AbraCadaver), Complex (curly) syntax is the way to go for invalid variables or property names:

$insertArray[0]->{"First.Name"} = $firstname;

Leave a Comment