Been seeing some curly braces in a CodeIgniter model/views:
mkdir("userdata/{$userID}/live/",0755,true);
I know $userID is some type of variable which probably contains session user id of user. My question is how can set some values for me to use such { }.
{$varname}is an explicit way of specifying the border of the variable namein this case php will try to output the value of variable with name
abcdefgin this case it will output the value of the variable
aand append it with string literalbcdefg.So you can use any variable you have visible in current scope within curly braces