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?

2
  • 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
    Commented Sep 16, 2013 at 15:34
  • t-f was correct. Pretty silly of me.
    – joshmax
    Commented Sep 16, 2013 at 15:45

1 Answer 1

3

Well, this is PHP...

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

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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