ScottWilson Posted May 6, 2014 Share Posted May 6, 2014 OK I wrote this bit of code <? for($i = 0; $i < $row_TableData['TourWins']; $i++) { echo '<img src="Assets/Medal.gif" />'; } ?> Its meant to be displaying the img src a number of times defined by the number in the 'Tourwins'. so if there's a 2 in the database TourWins then the Medal.gif will echo twice depicting the 2 tourwins but all I keep getting is this: '; } ?> Any ideas Link to comment https://forums.phpfreaks.com/topic/288280-echo-gif-in-table-equal-to-table-number/ Share on other sites More sharing options...
mac_gyver Posted May 6, 2014 Share Posted May 6, 2014 you need to use a complete opening php tag <?php Link to comment https://forums.phpfreaks.com/topic/288280-echo-gif-in-table-equal-to-table-number/#findComment-1478378 Share on other sites More sharing options...
ScottWilson Posted May 6, 2014 Author Share Posted May 6, 2014 oh yer ddduuuuurrrr lol it works now Link to comment https://forums.phpfreaks.com/topic/288280-echo-gif-in-table-equal-to-table-number/#findComment-1478380 Share on other sites More sharing options...
Ch0cu3r Posted May 6, 2014 Share Posted May 6, 2014 Lesson learned is to always use the full opening php tag. Not all php configurations have short_open_tag enabled Link to comment https://forums.phpfreaks.com/topic/288280-echo-gif-in-table-equal-to-table-number/#findComment-1478388 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.