Title: Variables between PHP blocks
Last modified: October 6, 2021

---

# Variables between PHP blocks

 *  [magofedor](https://wordpress.org/support/users/magofedor/)
 * (@magofedor)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/variables-between-php-blocks/)
 * Hi there,
 * I have a page to show some results of a test depending on GET variable.
 * In a PHP block, we receive GET variable and process all database queries and 
   calculations. No problem here.
 * Below, in certain parts of the same page, I need to show values calculated in
   the first php block.
 * Something like
    <?php echo “the result of some complex calculation is :”.$variable;?
   >
 * Where $variable is some of variables calculated in first php block.
 * However, it shows just the result of some complex calculation is :
 * Seems to php blocks doesn’t communicate each other. Is there a solution for that?¿
   any idea? ¿Am i doing something wrong?
 * Thanks,
    Luis

The topic ‘Variables between PHP blocks’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/php-everywhere_5f7aae.svg)
 * [PHP Everywhere](https://wordpress.org/plugins/php-everywhere/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/php-everywhere/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/php-everywhere/)
 * [Active Topics](https://wordpress.org/support/plugin/php-everywhere/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/php-everywhere/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/php-everywhere/reviews/)

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)

 * 0 replies
 * 1 participant
 * Last reply from: [magofedor](https://wordpress.org/support/users/magofedor/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/variables-between-php-blocks/)
 * Status: not resolved