0

A very short question

how can i get this echo $Auth->if; to work in this if statement? i get no error when i run it but it dosen't seems to work at all? echo $Auth->id; show show the id number of the user logged in.

If i do for example <?php echo $Auth->id; ?> by itself it outputs the users id as it should.

if(($shortUrlDomain['premium_only'] != '0') && ($shortUrlDomain['premium_only'] != 'echo $Auth->id;'))
{
 continue;
}
Rizzzler
  • 193
  • 2
  • 12

1 Answers1

3

Just replace echo $Auth->id;' by $Auth->id It won't work if you have an echo in your if also use == if = doesn't work.

if(($shortUrlDomain['premium_only'] !== '0') && ($shortUrlDomain['premium_only'] !==  $Auth->id))
    {
     continue;
    }