Kennnny Posted March 22, 2009 Share Posted March 22, 2009 ive got an issue with a plugin im tring to make with the isset() part as bellow if (isset($cmd) &&($cmd == 'Messages.home.64')) { $title[] = 'messages'; shRemoveFromGETVarsList('cmd'); } on the first line of the snippet i want the 64 part of the line to be called from a variable as it is the userid im at the end of my wit so help would be greatly apprechated. The variable is already set as $userId higher up in the script i just keep getting UNEXPECTED T VARIABLE with everything i try Quote Link to comment https://forums.phpfreaks.com/topic/150585-i-need-some-pointers-please-for-using-isset-please/ Share on other sites More sharing options...
Maq Posted March 22, 2009 Share Posted March 22, 2009 What's the exact error? Please paste the line with the error and some of the surrounding code, cause the code you provided is valid. Quote Link to comment https://forums.phpfreaks.com/topic/150585-i-need-some-pointers-please-for-using-isset-please/#findComment-790968 Share on other sites More sharing options...
Kennnny Posted March 22, 2009 Author Share Posted March 22, 2009 Yeh sorry the code is valid as it is, but the 64 part at the end of the text string is hardcoded in at the moment ie: if (isset($cmd) &&($cmd == 'Messages.home.64')) { $title[] = 'messages'; shRemoveFromGETVarsList('cmd'); } The problem i have is calling the 64 part (userid) as a variable ive tried the following with no luck could you tell me what im doin wrong or if its posible? if (isset($cmd) &&($cmd == 'Messages.home."$userId"')) { $title[] = 'messages'; shRemoveFromGETVarsList('cmd'); Quote Link to comment https://forums.phpfreaks.com/topic/150585-i-need-some-pointers-please-for-using-isset-please/#findComment-790976 Share on other sites More sharing options...
WolfRage Posted March 22, 2009 Share Posted March 22, 2009 <?php if (isset($cmd) &&($cmd == "Messages\.home\.$userId")) { ?> Quote Link to comment https://forums.phpfreaks.com/topic/150585-i-need-some-pointers-please-for-using-isset-please/#findComment-790977 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.