Last active
December 17, 2015 02:29
-
-
Save chrisamoore/5535916 to your computer and use it in GitHub Desktop.
Interpolated String Issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// I want this to work but I don't want to split and rejoin for operators | |
if(strpos($data, '.') !== false){ | |
$data = self::makePath($data); | |
// client->client_name | |
return self::$order->{$data}; | |
} | |
// This Works | |
if(strpos($data, '.') !== false){ | |
$a ='client'; | |
$b = 'client_name'; | |
return self::$order->{$a}->{$b}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment