0

This is most likely just a PHP problem, and it's probably a pretty simple answer, but I just can't seem to get my brain to function this morning. This is what I'm trying to do:

 $job_file = $cfs->get('job_file'); // job_file is a URL

 if ($job_file = NULL) {
     echo "NOT AVAILABLE";
 } else {
     echo '<a href="'. $job_file . '">' . get_the_title() . '</a>';
 }

It will display the URL of the current page instead of the $job_file variable. What am I missing?

  • I am betting on @t-f's answer but on the off chance that that isn't it, what is $cfs and how is the data saved? – s_ha_dum Sep 16 '13 at 15:34
  • t-f was correct. Pretty silly of me. – joshmax Sep 16 '13 at 15:45
3

Well, this is PHP...

if ($job_file == NULL) {
    ...

You might want to compare, and not set, right?

  • See, I knew it was something simple I was forgetting... Thanks. – joshmax Sep 16 '13 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.