Hello. I have a gallery and have a value in $bigger wich comes out as "http://linktoimage.com/imagename.jpg" if you print it "print '$bigger'; and now i want to have that link into a html link and wonder if this is possible or how i could to this otherwise? print '<center><a href="$bigger" target="_blank" >test</a></center>'; just comes out as http://linktoimage.com/$bigger right now :/
i get a "Parse error: syntax error, unexpected T_STRING" as soon as i try that :/ print "<center><a href="plogger_get_detail_link();" target="_blank" >Klicka här för större bild</a></center>";
try print '<div style="text-align:center;"><a href="$bigger" target="_blank" >test</a></div>'; Code (markup):
<?php $bigger = trim($bigger,'"') ?> print '<div style="text-align:center;"><a href="$bigger" target="_blank" >test</a></div>';
in another file there is $bigger = plogger_get_detail_link(); and "plogger_get_detail_link()" is what becomes "http://linktoimage.com/imagename.jpg". by just printing $bigger it diplayes the "http://linktoimage.com/imagename.jpg" link without it being a hyperlink ie text only. but i want it to a hyperlink under the text "click here for a larger image" wich is what's not working :/
or, just turn off PHP parsing before you use the HTML-codes, like this: ?> <a href="<?php echo $bigger; ?>" target="_blank"><?php echo $bigger; ?></a> <?php This can easily be used to separate HTML and PHP codes, and avoiding having to continously watch out for the use of " and/or '