Jump to content

Simple 'echo' code...


danweav

Recommended Posts

I'm simply trying to write some script that says... If A = B then $cbhop = C else $cbhop = D.

Then print $cbhop.

 

This is the code I've created so far... but for some reason its just not quite right yet... I'm currently getting a 'unexpected T_ECHO' error. Any ideas on how to get this to work?

 

<?php if ($row_RS_UserDetails['User_cbaff'] == 'NA') {

  $cbhop = echo $row_RS_ReferralDetails['User_ClickBank'];

  } else {

  $cbhop = echo $row_RS_UserDetails['User_cbaff'];

  } ?>

 

<?php echo $cbhop; ?>

 

Regards, Dan

Link to comment
https://forums.phpfreaks.com/topic/205253-simple-echo-code/
Share on other sites

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.