How would I split the results into two columns [closed]

Something like this should work though I havent testested it: PHP: <?php $inputs=”<ul class=”checkbox-columns”>”; foreach($subjects as $subject){ $inputs .= ‘<li><label><input type=”checkbox” name=”subjects[]” value=”‘ . $subject[‘subject’] . ‘”/>’ . $subject[‘subject’] . ‘</label></li>’; } $inputs .= ‘</ul>’; echo $inputs; CSS: .checkbox-columns { width: 200px; } .checkbox-columns li { display: block; float: left; width: 50%; } This creates … Read more

Can I have a php site on subdirectory of WordPress?

Technically, it’s possible. And it works. You could have a PHP site on a sub-directory like example.com/shop. But, a better practice is to host that PHP site on a sub-domain like shop.example.com. It helps in better maintenance and provides a better structure for organizing the site. On a Nginx server, your config should be something … Read more

Warning: Cannot modify header information

Well, the error says exactly what’s going on. You’re outputting content, before the data is finished being manipulated. It’s like you’re trying to echo something but WordPress still has to do some stuff and it’s telling you “No, no, let me do my thing first”. You’re calling the echo too early. In short, you’re 99% … Read more

php 7.0 update to 7.1 and at least 7.2

Many plugins have an ’empty’ index.php that doesn’t do anything; the plugin code is elsewhere. But you need to contact the plugin’s author/support to get a definitive answer.

Query Concatenation

In SQL statement use placeholders instead of variable: %s (string) or %d (number). The second argument of prepare() is array of variables to substitute into the placeholders. $skill_select = $wpdb->get_results( $wpdb->prepare(” SELECT skill_name, char_id, um_id, c.class_id FROM `wp_ml_skill_class` sc JOIN `wp_ml_skill` s ON (s.skill_id = sc.skill_id) JOIN `wp_ml_character` c WHERE c.class_id = %d AND c.char_id … Read more

Adding multiple emails to a

Looking at the snippet you provided the solution seems to be your last solution. $emails = array( $email, ‘[email protected]’,’[email protected]’ ); Sending an array of emails, the first one ($email) being the dynamic email. The second and third would be hard coded values. This is assuming the email handler is ready to accept an array of … Read more