Jump to content

I need some pointers please for using isset() please


Kennnny

Recommended Posts

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

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');

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.