xwishmasterx Posted May 26, 2012 Share Posted May 26, 2012 I have been trying for hours to get this to work but, simply cannot get the echo right. Problem is the single ' and double ". <a href='#' onClick="<?php for ($i = $start; $i < $end; $i++) { // make sure that PHP doesn't try to show results that don't exist if ($i == $total_results) { break; }?> window.open('<?php echo ".mysql_result($result, $i, 'te_link')."";?>;<?php }?>">link text</a> What I am trying to achive is getting my "$results", which are urls to be added like this: <a href="#" onClick="window.open('http://link1.com'); window.open('http://link2.com'); window.open('http://link3.com');">link text</a> any help on this one? (PS i know it's a mess ) Quote Link to comment https://forums.phpfreaks.com/topic/263179-problems-with-echoingonce-more/ Share on other sites More sharing options...
papillonstudios Posted May 26, 2012 Share Posted May 26, 2012 Can I see the full script? Quote Link to comment https://forums.phpfreaks.com/topic/263179-problems-with-echoingonce-more/#findComment-1348822 Share on other sites More sharing options...
Oreo Posted May 26, 2012 Share Posted May 26, 2012 window.open('<?php echo mysql_result($result, $i, 'te_link'); ?>');<?php }?>">link text</a> If that doesn't work, post the output that you are getting. Quote Link to comment https://forums.phpfreaks.com/topic/263179-problems-with-echoingonce-more/#findComment-1348823 Share on other sites More sharing options...
xwishmasterx Posted May 27, 2012 Author Share Posted May 27, 2012 I decide to go the easy way and skip the pagination..thanks for the help anyway. Quote Link to comment https://forums.phpfreaks.com/topic/263179-problems-with-echoingonce-more/#findComment-1348903 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.