I'm having a problem with these lines of code:
<a class="button" href="javascript:unhide('<?php $a; ?>')">Expand / Hide</a>
<?php echo substr($f2, 0, 400);?><div id="<?php $a; ?>" class = "hidden"><?php echo substr($f2, 400, 5000);?></div>
If the variable $a is replaced with plaintext then the code works, however when it links to a string variable it does not.
The example below shows an working version of the code (however because of the code's purpose I need to use a varaible):
<a class="button" href="javascript:unhide('exampleword')">Expand / Hide</a>
<?php echo substr($f2, 0, 400);?><div id="exampleword" class = "hidden"><?php echo substr($f2, 400, 5000);?>
Any ideas?