Hi I’m tring to use same variable in two different contexts in a single page.
some html
<?php
$variable1="sample"
?>
some html
<?php
$variable2=variable1
?>
some html
I know creating session is a solution. But I’m not sure if its suitable to create a session for this.
This is possible with normal variables. You just forgot the $-sign in the second part. And you really should add semicolons.