fraser5002 Posted April 9, 2010 Share Posted April 9, 2010 Hi can anyone tell me what is wrong with this php statement . Im trying to use php to put a text link on the page The link will call a javascript function when it is pressed passing the variable $i to it ( which is an integer) // // <a href="java_func(<? echo "$i" ?>)" > <? echo "$businessname" ?></a> // // Thanks Link to comment https://forums.phpfreaks.com/topic/198108-php-to-insert-href/ Share on other sites More sharing options...
litebearer Posted April 9, 2010 Share Posted April 9, 2010 perhaps... <a href="java_func(<?PHP echo $i; ?>)"><?PHP echo $businessname; ?></a> Link to comment https://forums.phpfreaks.com/topic/198108-php-to-insert-href/#findComment-1039444 Share on other sites More sharing options...
TeddyKiller Posted April 9, 2010 Share Posted April 9, 2010 Or perhaps.. <a href="java_func(<?= $i ?>)"><?= $businessname ?></a> Link to comment https://forums.phpfreaks.com/topic/198108-php-to-insert-href/#findComment-1039447 Share on other sites More sharing options...
fraser5002 Posted April 9, 2010 Author Share Posted April 9, 2010 Hmm neither are workign im afraid nothing is displayed on the page Link to comment https://forums.phpfreaks.com/topic/198108-php-to-insert-href/#findComment-1039448 Share on other sites More sharing options...
TeddyKiller Posted April 9, 2010 Share Posted April 9, 2010 Are the variables defined? Link to comment https://forums.phpfreaks.com/topic/198108-php-to-insert-href/#findComment-1039449 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.