Padgoi Posted October 11, 2007 Share Posted October 11, 2007 I have this code: <if="author['mgroup'] != 14"> {$post['signature']} </if> I want to add another number after 14. How would I go about doing that? I tried just adding a comma, but that caused an html parse error, as did a semi-colon. Any help would be greatly appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/72795-if-statement-question/ Share on other sites More sharing options...
pocobueno1388 Posted October 11, 2007 Share Posted October 11, 2007 Is this even PHP? Quote Link to comment https://forums.phpfreaks.com/topic/72795-if-statement-question/#findComment-367124 Share on other sites More sharing options...
Padgoi Posted October 11, 2007 Author Share Posted October 11, 2007 If it's considered HTML, I apologize for posting it here. Can anyone help regardless? Quote Link to comment https://forums.phpfreaks.com/topic/72795-if-statement-question/#findComment-367134 Share on other sites More sharing options...
KevinM1 Posted October 11, 2007 Share Posted October 11, 2007 If it's considered HTML, I apologize for posting it here. Can anyone help regardless? The problem is that your code isn't PHP. It seems to be a mishmash of PHP and HTML. PHP doesn't use tags for statements -- only if you're going from HTML to PHP, or vise versa. So, an if-statement does not look like: <if something> { ... } </if> If-statements, in PHP, look like: <?php if(something){ ... } ?> Note: I used the PHP start and end tags to turn on this message board's syntax highlighting. In order to answer your question, we'll need to see more code and know exactly what you're testing against. Quote Link to comment https://forums.phpfreaks.com/topic/72795-if-statement-question/#findComment-367148 Share on other sites More sharing options...
Padgoi Posted October 11, 2007 Author Share Posted October 11, 2007 It's a board script, Invision Power Board. It is going from PHP to HTML, but there is no other code, just that. Quote Link to comment https://forums.phpfreaks.com/topic/72795-if-statement-question/#findComment-367152 Share on other sites More sharing options...
KevinM1 Posted October 11, 2007 Share Posted October 11, 2007 It's a board script, Invision Power Board. It is going from PHP to HTML, but there is no other code, just that. Looks like they're using a templating system then, as what you posted originally isn't plain PHP. Like I asked before, what do you want to test against? You mentioned another number other than 14. Is it just one other number? Or a range of other numbers? Quote Link to comment https://forums.phpfreaks.com/topic/72795-if-statement-question/#findComment-367158 Share on other sites More sharing options...
Padgoi Posted October 11, 2007 Author Share Posted October 11, 2007 Just one other number. Instead of it just being 14, I need it to be 14 and 22. Quote Link to comment https://forums.phpfreaks.com/topic/72795-if-statement-question/#findComment-367192 Share on other sites More sharing options...
trq Posted October 11, 2007 Share Posted October 11, 2007 The problem is, whatever you have posted is not php so we can't really offer php help. Quote Link to comment https://forums.phpfreaks.com/topic/72795-if-statement-question/#findComment-367196 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.