$data[0][$k]['message'] = 'You have successfully joined <a href="../c/'.$r['companytag'].'">'.$r['feedfirstname'].'</a> in '.industry($r['industry']).' at '.stage($r['stage']).' stage'.if (empty($otherfans)){"."};
Best Syntax
-
- Posts: 165
- Joined: Fri May 06, 2011 5:02 pm
Best Syntax
What is the best syntax for this? I don't even know if the last part of this works.
Re: Best Syntax
Well, have you tried if it works?
That all looks fine except for the last part. You cannot use an if statement like that.
That all looks fine except for the last part. You cannot use an if statement like that.
Please check out my CodeCanyon items.
-
- Posts: 165
- Joined: Fri May 06, 2011 5:02 pm
Re: Best Syntax
Yeah, the last part fails. Do you know how to properly write this?Tino wrote:Well, have you tried if it works?
That all looks fine except for the last part. You cannot use an if statement like that.
Re: Best Syntax
You would just do
$string = 'my string'; if ( empty($otherfans) ) { $string .= '.'; }obviously replacing 'my string' with what you put in the first post.
Please check out my CodeCanyon items.