0

In PHP, I'm trying to set the value of a variable number conditionally - so that it is dependent on the browser width or screen size (not sure which is most sensible).

I've read that I can't do this all in PHP itself but am confused as to how to approach this.

This is the situation I currently have...

if ( fmod( $i, (int) number ) == 0 && $i != (int) $wp_query >post_count ) {
          echo '</div><div class="row">';
      } elseif ( $i == (int) $wp_query->post_count ) {
          continue;
      } 

Can anybody help me resolve this issue please?

Many thanks, Ed

0 Answers0