Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
535 views
in Q2A Core by
Hello,

I want to add an if (the answer!=0) {$image=lala.jpg} else $image=lalala.jpg;

how do I count $post['answers_raw'] ? I tried but i get an error.

Thankyou

 

***************************************************************************

EDIT: I managed to do it:

$myvariable=@$post['answers_raw'];

I won't close the question, maybe it will help other people
Q2A version: 1.5.4
by
The kind of page which wants to process is not described by your question.
If you want an exact answer, you should carry information in more detail.

1 Answer

0 votes
by
I think you can do it via css file.

There is class for styling answer when there are answer or not, you can do something like that :

.qa-a-count-zero {background-image:url(no-answer.jpg');}

.qa-a-count{backgound-image:url('answer.jpg');}

and place your image via background-position
...