i have a php variable which is storing the substring of a string. but on the click of a button i want it to store the whole string

<?php
$short_description = 
substr($brand_description,0,299);//$short_description is  storing the substring
echo '<span>';
<p>About:</p> '.$short_description.'</span>'; 
echo '<span id="read_more">'; echo '<button onclick="display_more()"> Read more</button>'; echo '</span>';
?>

//onclick of the read more button i want $short_description to store the whole of $brand_description

try this

and in your js part do like this

$('#changeMe').text('<?php echo $brand_description;?>');