Title: php not working
Last modified: November 22, 2016

---

# php not working

 *  [jenefer](https://wordpress.org/support/users/jenefer/)
 * (@jenefer)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/php-not-working-5/)
 * Hi,
    I have two questions please. Is there anyway to stop the code box stretching
   across the whole screen on the admin side without adding breaks in the code? 
   I have entered some php into the box and it just prints as text. This is the 
   php
 * $results = $wpdb->get_results(“SELECT utility_name FROM db_utility INNER JOIN
   ma_utility ON db_utility.utility_id=ma_utility.utility_id WHERE ma_utility.loc_id
   =$location AND db_utility.utility_group=’Fuel’ ORDER BY utility_name ASC”);
 * Any ideas what I am doing wrong?
    Thanks

Viewing 1 replies (of 1 total)

 *  Plugin Author [ptasker](https://wordpress.org/support/users/ptasker/)
 * (@ptasker)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/php-not-working-5/#post-8474148)
 * The reason the code is stretching the editor box like that is because it’s basically
   one long string. If you break it up or concatenate it, it could be broken to 
   other other lines.
 * As for outputting PHP, the code field doesn’t include any functionality to output
   the PHP contents with get_field(). You’ll have to handle that yourself, possibly
   using exec() or similar.

Viewing 1 replies (of 1 total)

The topic ‘php not working’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/acf-code-field_2b393f.svg)
 * [ACF Code Field](https://wordpress.org/plugins/acf-code-field/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/acf-code-field/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/acf-code-field/)
 * [Active Topics](https://wordpress.org/support/plugin/acf-code-field/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/acf-code-field/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/acf-code-field/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [ptasker](https://wordpress.org/support/users/ptasker/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/php-not-working-5/#post-8474148)
 * Status: not resolved